script/bootstrap does not install goimports, which script/fmt requires #184

Open
opened 2026-08-07 18:47:47 +02:00 by clawbot · 1 comment
Collaborator

Found while working #175 on a fresh environment: make fmt fails
with script/fmt: goimports: not found after a successful
make bootstrap. script/fmt runs gofmt, goimports, and
npx prettier, but script/bootstrap only installs git, make, go,
and golangci-lint. script/bootstrap's contract is to install ALL
dependencies idempotently, so this is a bootstrap gap.

Remediation: install a pinned goimports in script/bootstrap
(e.g. go install golang.org/x/tools/cmd/goimports@vX.Y.Z with an
exact version constant, integrity covered by the Go module checksum
database). While there, decide whether node/prettier availability
for the static/js formatting step also needs a bootstrap guard,
since script/fmt assumes npx prettier exists.

Definition of done:

  • on a machine without goimports, make bootstrap followed by
    make fmt succeeds
  • the installed version is pinned exactly (no @latest), with a
    version comment per REPO_POLICIES.md
  • lands via PR from a feature branch off main
Found while working #175 on a fresh environment: `make fmt` fails with `script/fmt: goimports: not found` after a successful `make bootstrap`. `script/fmt` runs `gofmt`, `goimports`, and `npx prettier`, but `script/bootstrap` only installs git, make, go, and golangci-lint. `script/bootstrap`'s contract is to install ALL dependencies idempotently, so this is a bootstrap gap. Remediation: install a pinned `goimports` in `script/bootstrap` (e.g. `go install golang.org/x/tools/cmd/goimports@vX.Y.Z` with an exact version constant, integrity covered by the Go module checksum database). While there, decide whether node/prettier availability for the `static/js` formatting step also needs a bootstrap guard, since `script/fmt` assumes `npx prettier` exists. Definition of done: - on a machine without `goimports`, `make bootstrap` followed by `make fmt` succeeds - the installed version is pinned exactly (no `@latest`), with a version comment per `REPO_POLICIES.md` - lands via PR from a feature branch off `main`
clawbot added this to the 1.1.0 milestone 2026-08-07 18:47:47 +02:00
Author
Collaborator

Re-verified against main @ 7a34fc9 on 2026-09-03 — still valid, unchanged.

script/bootstrap installs git, make, go and golangci-lint (now pinned to 2.12.2 release archives by PR #187), but there is still no goimports install path — grep goimports script/bootstrap returns nothing. script/fmt still calls it unconditionally:

gofmt -s -w .
goimports -w .
npx prettier --write --tab-width 4 static/js/*.js

So make bootstrap && make fmt still fails on a clean machine. Both open questions in the description also stand: pin the goimports version exactly (no @latest), and decide whether node/npx prettier needs a bootstrap guard for the third line.

Note this interacts with #188, which would remove golangci-lint from script/bootstrap entirely (moving lint into Docker). These two should be sequenced deliberately rather than landed in parallel — whoever picks up the second one should rebase on the first.

Re-verified against `main` @ 7a34fc9 on 2026-09-03 — **still valid, unchanged.** `script/bootstrap` installs git, make, go and golangci-lint (now pinned to 2.12.2 release archives by [PR #187](https://git.eeqj.de/sneak/upaas/pulls/187)), but there is still no `goimports` install path — `grep goimports script/bootstrap` returns nothing. `script/fmt` still calls it unconditionally: ```sh gofmt -s -w . goimports -w . npx prettier --write --tab-width 4 static/js/*.js ``` So `make bootstrap && make fmt` still fails on a clean machine. Both open questions in the description also stand: pin the `goimports` version exactly (no `@latest`), and decide whether node/`npx prettier` needs a bootstrap guard for the third line. Note this interacts with [#188](https://git.eeqj.de/sneak/upaas/issues/188), which would remove golangci-lint from `script/bootstrap` entirely (moving lint into Docker). These two should be sequenced deliberately rather than landed in parallel — whoever picks up the second one should rebase on the first.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#184