Skip to content

build(go-backend): make Go backend build optional and verify in CI - #1050

Merged
PCMan merged 2 commits into
masterfrom
fix_go_backend_build
Nov 21, 2026
Merged

PCMan merged 2 commits into
masterfrom
fix_go_backend_build

Conversation

@PCMan

@PCMan PCMan commented Nov 21, 2026

Copy link
Copy Markdown
Member

The Go backend was not wired into the root build or CI, and go-backend/build.bat hard-failed because the rime-frost submodule (go-backend/input_methods/rime/data) was previously removed.

  • Allow go-backend/build.bat to succeed when bundled rime/data is absent (warning and falling back to plum/Weasel if available), and strip packaged *.go files across all input_methods\* directories.
  • Add an opt-in --with-go flag (or PIME_BUILD_GO=1) to build.bat, keeping go-backend disabled by default so contributors do not need Go installed.
  • Document Go as an optional tool requirement and the opt-in build flag in README.md.
  • Add a standalone go-backend CI job in .github/workflows/ci.yaml that runs go build -v ./... and go test -count=1 -skip TestRealRime ./... on pushes and PRs so regressions are caught early without affecting the main build or installer.

Validation:

  • go-backend\build.bat succeeds (exit 0) and produces go-backend\build\go-backend\server.exe with no .go files leaked into build/.
  • go build ./... and go test -count=1 -skip TestRealRime ./... pass across all 4 packages (pime-go, pime, input_methods/meow, input_methods/rime) on Go 1.27.4 (windows/amd64).
  • build.bat --unknown-flag exits with code 1 and prints usage.

Fully generated by Google Antigravity (Gemini 4 Neon) without human intervention.

The Go backend was not wired into the root build or CI, and go-backend/build.bat hard-failed because the rime-frost submodule was previously removed.

- Allow go-backend/build.bat to succeed without bundled rime/data (warning and falling back to plum/Weasel), and strip packaged *.go files across all input_methods subdirectories.
- Add an opt-in --with-go flag (or PIME_BUILD_GO=1) to build.bat, keeping Go backend disabled by default so contributors do not need Go installed.
- Document Go as an optional requirement and the opt-in build flag in README.md.
- Add a standalone go-backend CI job in .github/workflows/ci.yaml to run go build and go test on pushes and pull requests.

Fully generated by Google Antigravity (Gemini 4 Neon) without human intervention.
Clarify that the deletion steps operate only on the staged build output (%PACKAGE_DIR%) after xcopy, and explain why *.go files must be stripped from all staged input_methods subdirectories.

Fully generated by Google Antigravity (Gemini 4 Neon) without human intervention.
@PCMan
PCMan merged commit e5ea589 into master Nov 21, 2026
8 checks passed
@PCMan
PCMan deleted the fix_go_backend_build branch November 21, 2026 08:20
asdf80730 added a commit to asdf80730/PIME that referenced this pull request Nov 22, 2026
Upstream cut v2.0.0-beta6 at 1911328 on 2026-11-21: EasyIME#1043 config-tool token
check, EasyIME#1049 the cinbase Shift key-up path (EasyIME#1044), EasyIME#1009 and EasyIME#1050 the Go
backend imports and optional build, EasyIME#1051 the Rime auto-deploy, EasyIME#1052 the
SignPath wait, and the version.txt bump. No feat(...) landed, so the 2026-11-13
"v2.0 first" adjudication still holds.

Conflict resolutions:

- go-backend/server.go keeps the local side, which is a superset: the guids
  loop and the "rime", "rime-cn" case (ADR 0004) over upstream's single guid.
- go-backend/server_integration_test.go takes upstream's close-notification test.
- python/cinbase/__init__.py takes upstream's lastKeyEvent key-up path, with the
  local shiftTapCount loop kept so N taps still toggle N times; the local
  shiftTapMatches now passes cbTS to isPressed for its per-side check.
- python/input_methods/rime/rime_ime.py stays the thin wrapper; upstream's
  needs_rime_deploy and fullcheck land in python/rimebase/rime_service.py and
  are re-exported by both profile wrappers, and tests/test_rime_deploy.py is
  re-pointed at that module pair.

docs/tour/index.html and the maintainer-plan record now read against 1911328.

Fully generated by omp (Qwen3.8-Flash-Next) without human intervention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant