build: Pin the fyne CLI to go.mod and check toolchains first #38

Closed
opened 2026-10-10 21:47:00 +00:00 by mira · 1 comment
Collaborator

go.mod pins fyne.io/fyne/v2 v2.3.5 (go.mod:6), but CI installs the packaging CLI with go install fyne.io/fyne/v2/cmd/fyne@latest (.gitea/workflows/pull-request-ci.yaml:54, 84; push-ci.yaml:58, 88; tag-release.yaml:57, 88), which is v2.8.1 today. The CLI and the library are five minors apart. golangci-lint is pinned to v2.13.2 (pull-request-ci.yaml:31, push-ci.yaml:35, tag-release.yaml:33). There's no local check for any of it.

Justin's forge rule (2026-10-10): any toolchain that can only have one version installed at a time gets a preflight in the build. On a mismatch the build stops before doing anything, says what it found and what's required, and prints the exact fix. Standard and snippets: https://git.s1d3sw1ped.com/s1d3sw1ped/forge-standards/src/branch/master/forge-toolchain.md (preflight script: https://git.s1d3sw1ped.com/s1d3sw1ped/forge-standards/raw/branch/master/check-toolchain.sh). It follows the design in s1d3sw1ped/AI-Phone#322.

What to do

  • There's no Makefile. Add scripts/check-toolchain.sh from the snippet, extended with a fyne CLI check against the go.mod fyne version (fix: go install fyne.io/fyne/v2/cmd/fyne@v2.3.5), plus a small Makefile whose build and package depend on it. Run it in CI after setup-go.
  • The preflight also fails if go.mod's go, toolchain or wails lines differ from HEAD (a silent rewrite), when the repo has a go.mod.
  • Add a line to the README's build section: what's checked and how to fix a mismatch.

Align with the forge standard in the same PR (all patch/minor or CI-only):

  • Add toolchain go1.27.2 under the go 1.27.0 line in go.mod (go.mod:3), so everyone builds on the same patch release and Go fetches it if the local one is older.
  • Install the fyne CLI at the go.mod version, @v2.3.5, in all six CI spots listed above.
  • golangci-lint v2.13.2 to v2.14.0 (the three version: lines above).

Acceptance

  • With a mismatched toolchain, the build stops before doing any work and prints found, required and the fix command. Nothing in the tree changes (git status is clean).
  • With the right toolchain, every build target works as before.
  • Editing a pinned go.mod line away from HEAD is caught.
  • CI passes and runs the preflight.

Out of scope

fyne stays at v2.3.5 by decision (Justin, 2026-10-10). Pinning the CLI to v2.3.5 covers the mismatch, so don't bump the library here. Major bumps of the CI actions (setup-go v7, setup-node v7, checkout v7, goreleaser-action v7, golangci-lint-action v9): stay on the current standard here; they're being piloted in s1d3sw1ped/vulture#17 first. Node stays on 24 (recheck in November, after 26 becomes LTS on 2026-10-28).

Handoff

One PR against the default branch. Ask Eva for review and don't merge it yourself. If it gets in the way, git revert the merge; nothing else to undo. Line refs are the default branch at 1d12405.

Model: Gemma 26B censored.

go.mod pins fyne.io/fyne/v2 v2.3.5 (go.mod:6), but CI installs the packaging CLI with `go install fyne.io/fyne/v2/cmd/fyne@latest` (.gitea/workflows/pull-request-ci.yaml:54, 84; push-ci.yaml:58, 88; tag-release.yaml:57, 88), which is v2.8.1 today. The CLI and the library are five minors apart. golangci-lint is pinned to v2.13.2 (pull-request-ci.yaml:31, push-ci.yaml:35, tag-release.yaml:33). There's no local check for any of it. Justin's forge rule (2026-10-10): any toolchain that can only have one version installed at a time gets a preflight in the build. On a mismatch the build stops before doing anything, says what it found and what's required, and prints the exact fix. Standard and snippets: https://git.s1d3sw1ped.com/s1d3sw1ped/forge-standards/src/branch/master/forge-toolchain.md (preflight script: https://git.s1d3sw1ped.com/s1d3sw1ped/forge-standards/raw/branch/master/check-toolchain.sh). It follows the design in s1d3sw1ped/AI-Phone#322. ## What to do - There's no Makefile. Add `scripts/check-toolchain.sh` from the snippet, extended with a fyne CLI check against the go.mod fyne version (fix: `go install fyne.io/fyne/v2/cmd/fyne@v2.3.5`), plus a small Makefile whose `build` and `package` depend on it. Run it in CI after setup-go. - The preflight also fails if go.mod's go, toolchain or wails lines differ from HEAD (a silent rewrite), when the repo has a go.mod. - Add a line to the README's build section: what's checked and how to fix a mismatch. Align with the forge standard in the same PR (all patch/minor or CI-only): - Add `toolchain go1.27.2` under the `go 1.27.0` line in go.mod (go.mod:3), so everyone builds on the same patch release and Go fetches it if the local one is older. - Install the fyne CLI at the go.mod version, `@v2.3.5`, in all six CI spots listed above. - golangci-lint v2.13.2 to v2.14.0 (the three `version:` lines above). ## Acceptance - [ ] With a mismatched toolchain, the build stops before doing any work and prints found, required and the fix command. Nothing in the tree changes (`git status` is clean). - [ ] With the right toolchain, every build target works as before. - [ ] Editing a pinned go.mod line away from HEAD is caught. - [ ] CI passes and runs the preflight. ## Out of scope fyne stays at v2.3.5 by decision (Justin, 2026-10-10). Pinning the CLI to v2.3.5 covers the mismatch, so don't bump the library here. Major bumps of the CI actions (setup-go v7, setup-node v7, checkout v7, goreleaser-action v7, golangci-lint-action v9): stay on the current standard here; they're being piloted in s1d3sw1ped/vulture#17 first. Node stays on 24 (recheck in November, after 26 becomes LTS on 2026-10-28). ## Handoff One PR against the default branch. Ask Eva for review and don't merge it yourself. If it gets in the way, git revert the merge; nothing else to undo. Line refs are the default branch at 1d12405. Model: Gemma 26B censored.
Author
Collaborator

Path update from the Forgejo cutover (10/17-18): this repo's CI workflows moved from .gitea/workflows/ to .forgejo/workflows/ (.forgejo/workflows/pull-request-ci.yaml .forgejo/workflows/push-ci.yaml .forgejo/workflows/tag-release.yaml ). Wherever this issue says .gitea/workflows, edit the file under .forgejo/workflows/ instead, and don't recreate .gitea/. Line numbers may have shifted. Scope and acceptance are unchanged.

Path update from the Forgejo cutover (10/17-18): this repo's CI workflows moved from `.gitea/workflows/` to `.forgejo/workflows/` (.forgejo/workflows/pull-request-ci.yaml .forgejo/workflows/push-ci.yaml .forgejo/workflows/tag-release.yaml ). Wherever this issue says `.gitea/workflows`, edit the file under `.forgejo/workflows/` instead, and don't recreate `.gitea/`. Line numbers may have shifted. Scope and acceptance are unchanged.
linus closed this issue 2026-10-22 23:34:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
s1d3sw1ped/SwipedModSwitcher#38
No description provided.