* fix: route air's own log messages to stderr instead of stdout
Air's internal loggers (main, build, runner, watcher) were writing to
stdout, causing air's messages to intermix with the user's application
output. This made it impossible to separate them with shell redirections
like `air 2>/dev/null`.
Change the log output destination from os.Stdout/color.Output to
os.Stderr/color.Error so air's messages go to stderr while the user's
app output remains on stdout.
Also remove dead `c.Stdout` and `c.Stderr` assignments in startCmd()
on all platforms — these had no effect after StdoutPipe()/StderrPipe()
were already called.
Fixes#744
Signed-off-by: majiayu000 <1835304752@qq.com>
* test: add regression test for logger stderr routing
Signed-off-by: majiayu000 <1835304752@qq.com>
* fix: route warning messages in config.go to stderr
Signed-off-by: majiayu000 <1835304752@qq.com>
* fix: update smoke test to check stderr for air log messages
Since air's log output now goes to stderr, the smoke test must check
nohup.err instead of nohup.out for the "running" message.
Signed-off-by: majiayu000 <1835304752@qq.com>
* fix: print splash banner to stderr
---------
Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: xiantang <zhujingdi1998@gmail.com>
* Bind test listeners to loopback
* Adjust Windows test expectations
* Fix Windows test setup
* Fix lint in dangerous root test
* Stabilize Windows engine tests
* Add Windows unit tests to CI
* Prevent cwd leakage in tests
* Normalize line endings in CI
* Skip unstable Windows engine tests
* Move Windows line-ending normalization to windows job
* Stabilize ctrl-c build failure test
* Skip touch-based engine tests on Windows
Reduce test execution time through smart waiting and selective parallelization.
Changes:
- Replace fixed sleep delays with condition-based waiting (20ms polling)
- Add CI-aware timeout multiplier (2x in CI environments)
- Enable parallel execution for 30+ pure function tests
- Add test and test-ci Make targets
- Update GitHub Actions workflow with CI flag and timeout
Performance:
- Before: ~60 seconds
- After: ~35 seconds
- Improvement: 42% faster (25 seconds saved)
Technical details:
- New helpers: waitForCondition(), waitForEngineState() in test_util.go
- Optimized tests: TestRebuild, TestRun, TestRebuildWhenRunCmdUsingDLV, etc.
- Parallelized: config_test.go (6 tests), flag_test.go (1 test), util_test.go (13 tests)
- Avoided parallelizing tests with global state (os.Setenv, os.Chdir, signal handlers)
Limitations:
- Some tests cannot be parallelized due to Go 1.25 restrictions on t.Parallel() + t.Setenv()
- Pre-existing race conditions in engine tests remain (not addressed in this change)
* upgrade the actions for checkout and golang
* delete the unstale windows golanglint-ci
* use relative path
* Update golangci-lint setup for Windows workflow
* Remove Windows smoke test workflow
* chore: update Go version to 1.25.1 and dependencies
- Updated Dockerfile to use Go 1.25.1 for both builder and final images.
- Modified README files (Japanese, Chinese Simplified, Chinese Traditional, and English) to reflect the new Go version requirement of 1.25.1.
- Updated go.mod to specify Go 1.25 and updated dependencies:
- Upgraded hugo from v0.147.6 to v0.149.1
- Upgraded testify from v1.10.0 to v1.11.1
- Upgraded other indirect dependencies to their latest versions.
- Updated go.sum to reflect the changes in dependencies.
* fix: update golangci-lint to use latest version and install mode
- Update the version of `actions/checkout` from `v2` to `v4` in `.github/workflows/build.yml`
- Update the version of `actions/setup-go` from `v2` to `v4` in `.github/workflows/build.yml`
- Update the version of `codecov/codecov-action` from `v2` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/setup-qemu-action` from `v1` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/setup-buildx-action` from `v1` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/login-action` from `v1` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/build-push-action` from `v2` to `v5` in `.github/workflows/build.yml`
- Update the version of `docker/setup-qemu-action` from `v1` to `v3` in `.github/workflows/release.yml`
- Update the version of `docker/setup-buildx-action` from `v1` to `v3` in `.github/workflows/release.yml`
- Update the version of `docker/login-action` from `v1` to `v3` in `.github/workflows/release.yml`
- Update the version of `docker/build
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* go mod tidy -go=1.17
* update docker base image to go 1.17
* use go1.17 in github actions
* Install using `go get` has been deprecated in 1.16, so use `go install` command