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

Open
opened 2026-08-07 18:47:47 +02:00 by clawbot · 0 comments
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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#184