Skip to content

chore(devenv): add live reload support for Go backend server using air (#1019) - #1023

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-xolkuqwnspuk
Sep 17, 2026
Merged

kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-xolkuqwnspuk

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 17, 2026

Copy link
Copy Markdown
Member

Closes #1019

Summary

  • Added github.com/air-verse/air as a Go tool dependency in go.mod (go tool air) so developers can use live reload without manual global installation.
  • Added .air.toml configured to watch cmd/ and pkg/ while excluding web/, pkg/server/dist/, test utilities (pkg/testutil), and *_test.go files. Enabled send_interrupt = true for graceful shutdown.
  • Added make watch-go target in scripts/make/build.mk that supports port/host customization via PORT/BACKEND_PORT and HOST/BACKEND_HOST. Runs make build-web only when pkg/server/dist/browser/build-web.done does not exist yet (initial build or after make clean), avoiding redundant frontend builds on subsequent web file edits.
  • Updated Makefile clean target and .gitignore to handle .air build artifacts.
  • Updated English and Japanese developer documentation (development-guide.md) with make watch-go instructions.
@kyasbal kyasbal added area:devenv Development environment, Makefile, and build tooling type:chore Maintenance, dependency updates, and tooling chores labels Sep 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates the air tool to enable live reloading for the Go backend server during development. It adds the .air.toml configuration, updates the Makefile and .gitignore to manage .air build artifacts, documents the new make watch-go command, and updates go.mod and go.sum with the necessary dependencies. However, a critical issue was found in scripts/make/build.mk where the definitions of PORT and BACKEND_PORT create a circular dependency in GNU Make, which will cause a fatal error during execution.

Comment thread scripts/make/build.mk Resolved
@kyasbal
kyasbal enabled auto-merge September 17, 2026 06:07
@kyasbal
kyasbal added this pull request to the merge queue Sep 17, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 85d85ec Sep 17, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-xolkuqwnspuk branch September 17, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:devenv Development environment, Makefile, and build tooling type:chore Maintenance, dependency updates, and tooling chores

1 participant