Check that libc stays at the version the SQLite driver requires
modernc.org/sqlite is C transpiled to Go against one version of modernc.org/libc, and its go.mod names that version exactly: v1.80.1 for v1.64.0, while libc's latest is v1.82.14. A newer libc breaks the driver without a compile error, and a routine go get -u would move it. The owner accepted holding libc there as the one exception to taking each dependency at its latest stable release; it moves only with the driver. tools/libcpin compares the libc that go list -m selects with the one go mod graph shows the selected modernc.org/sqlite requiring, and fails with the go get that restores it. It runs as go run ./tools/libcpin, so it works from PowerShell and in CI alike. test.yml and make check run it after go mod tidy -diff, CLAUDE.md lists it in the gate and records the exception beside the dependency rule, and design.md records it under the stack choices. Moving libc to v1.82.14 with go get made the check fail as it should; the change was not kept. Part of stage 1d of docs/plans/job-store.md (decision 13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5ae323b570
commit
2926a69598
7 files changed
+147
-8
No files matched your search
@@ -51,8 +51,10 @@ it to the server in its config, so the generator never builds the package
|
||||
that embeds its own output. `tools/genlicenses` writes
|
||||
`THIRD-PARTY-LICENSES.md` and the copy beside `internal/app/uberbringer`'s
|
||||
`licenses.go`; it imports nothing from the module and learns the linked
|
||||
modules from `go list`. The module path is the bare
|
||||
`uberbringer`, so imports read `uberbringer/internal/...`. Imports point down:
|
||||
modules from `go list`. `tools/libcpin` checks the libc pin from
|
||||
`go mod graph` and imports nothing from the module either. The module path
|
||||
is the bare `uberbringer`, so imports read `uberbringer/internal/...`.
|
||||
Imports point down:
|
||||
|
||||
- server → modules, printqueue, receipt, printer, escpos
|
||||
- modules → receipt, ntfy
|
||||
@@ -77,6 +79,7 @@ works from PowerShell and fails from Git Bash.
|
||||
gofmt -l . # must print nothing (fix: gofmt -w .)
|
||||
go tool goimports -l . # must print nothing (fix: go tool goimports -w .)
|
||||
go mod tidy -diff
|
||||
go run ./tools/libcpin # modernc.org/libc is the version modernc.org/sqlite requires
|
||||
go vet ./...
|
||||
go tool staticcheck ./...
|
||||
go generate ./... && git diff --exit-code -- docs/swagger.json THIRD-PARTY-LICENSES.md internal/app/uberbringer/licenses_embed.md # generated files are up to date
|
||||
@@ -153,7 +156,8 @@ main. A change is done when the gate passes and the docs under `docs/` (or
|
||||
- Dependencies are at their latest stable release when added or bumped.
|
||||
The one exception is `modernc.org/libc`, which stays at the exact version
|
||||
`modernc.org/sqlite` requires and moves only with it (owner, 2026-12-01;
|
||||
design.md, Stack choices).
|
||||
design.md, Stack choices). `go get -u` would move it, so after one run
|
||||
`go run ./tools/libcpin`, which fails until libc is back at that version.
|
||||
- Commit on main, land a branch, push, tag or release only when the owner
|
||||
asks. Releases are `vX.Y.Z` tags on `main`; `release.yml` refuses a tag
|
||||
whose commit is not on `main`.
|
||||
|
||||
Reference in new issue
Block a user