Repository navigation
chore: lower minimum Go to 1.26.0, test on stable/oldstable, drop vendor/ - #225
Merged
Merged
Conversation
The go directive of a library is the minimum Go version for its users: go 1.27.4 made every consumer upgrade, while the code needs far less. Set it to 1.26.0, the older of the two supported Go releases, and add a CI job that runs the tests with exactly that version (setup-go reads it from go.mod; GOTOOLCHAIN=local forbids switching to a newer one). bump-go.sh now bumps only the development toolchain and leaves the root go.mod alone. Users never build a library's vendor/, so it only added noise to the dependency PRs: remove it, ignore it, and replace sync-vendor with a tidy target. Drop template leftovers: the unused goreleaser gomod section (builds are skipped), lint rules for a logger, HTTP and SQL this library does not use, and exclusions for paths of another project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vet() treated any stderr output as a finding, and its EXIT_CODE was the exit code of `declare`, so always 0. Without vendor/ the first run prints "go: downloading ..." to stderr, which failed `make vet` in the lint and CodeQL jobs. Fail on the exit code of go vet instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #225 +/- ##
=======================================
Coverage 88.48% 88.48%
=======================================
Files 5 5
Lines 382 382
=======================================
Hits 338 338
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Use the setup-go aliases instead of a pinned version: - Tests run on a [stable, oldstable] matrix, the two supported Go releases. GOTOOLCHAIN=local keeps oldstable from switching to a newer toolchain, so the job fails if go.mod requires more than oldstable. This replaces the separate minimum-Go job. Tests run with go test: make test builds gotestsum from tools/, which needs a newer Go than oldstable. - Build, lint, reports, release and CodeQL run on stable, without single-value matrices. - Drop the actions/cache steps: setup-go already caches modules and build outputs by default, and both matrix jobs would have raced for the same actions/cache key. The reports job adds tools/*/go.sum to the setup-go cache key because it builds the coverage tools. - Run on pull requests into any branch: '*' did not match branch names with a slash, so stacked PRs got no CI. - Drop the .gohtml and .proto path filters; the repo has no such files. - bump-go.sh no longer rewrites CI versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Minimum Go version. In a library the
godirective is the minimum Go version for every user:go getraises theirgo.modto it. Withgo 1.27.4, every consumer had to upgrade, while the code needs far less.go.modnow saysgo 1.26.0, the older of the two supported Go releases.CI on
stable/oldstable(setup-go aliases):[stable, oldstable]matrix.GOTOOLCHAIN=localkeeps oldstable from switching to a newer toolchain, so the job fails ifgo.modrequires more than oldstable. Tests run withgo test -race ./..., becausemake testbuilds gotestsum fromtools/, whosego.modneeds a newer Go than oldstable.stable, without single-value matrices.actions/cachesteps are removed. setup-go already caches modules and build outputs by default, so caching was done twice, and both matrix jobs would have raced for the sameactions/cachekey. The reports job addstools/*/go.sumto the setup-go cache key, because it builds the coverage tools.branches: ['*']did not match names with a slash, so stacked PRs like feat: default to "," separator and RFC3339 time layout #224 got no CI..gohtmland.protopath filters are removed; the repo has no such files.scripts/bump-go.shbumps only the development toolchain (tool modules, docs). It no longer rewrites CI versions and leaves the rootgo.modalone.vendor/. Users never build a library's
vendor/(868K, testify only), so it only added noise to dependabot PRs. It is removed and ignored. Thesync-vendormake target is replaced bytidy(go mod tidy+go mod verify).make vet.vet()inscripts/linting/linters-source.shtreated any stderr output as a finding, and itsEXIT_CODEcame fromdeclare, so it was always 0. Withvendor/gone, the first run printsgo: downloading ...to stderr, which failed the lint and CodeQL jobs. It now fails on the exit code ofgo vet.Template leftovers:
.goreleaser.yml: thegomodsection (mod: vendor,GOPRIVATE=example.com/blah). Builds are skipped, so it was unused..golangci.yml: depguard with the logrus/logger rule, andbodyclose,rowserrcheck,noctx(there is no HTTP or SQL here)..golangci.pipe.yml: exclusions forinternal/input/andinternal/puzzles/constants.gofrom another project.Testing
go vet ./...andgo test -race ./...pass with go1.26.0 andGOTOOLCHAIN=local. refactor: replace parser hierarchy with a single generic Parse #223 and feat: default to "," separator and RFC3339 time layout #224 use nothing newer than Go 1.24 (b.Loop,reflect.TypeFor).make vetpasses with an empty module cache and fails on a deliberatePrintfmistake.bump-go.sh 1.27.5on a copy of the repo: the tool modules got 1.27.5, the rootgo.modstayed at 1.26.0, and the workflows were not touched.goreleaser checkpasses.golangci-lint config verifypasses for both configs, and both report 0 issues.Possible failures/side-effects
stableandoldstablemean without a commit.go 1.26.0is no longer tested. Raise the minimum ingo.modthen.Run Tests (Go stable),Run Tests (Go oldstable),Build,Run linters,Quality reports,Analyze (go). No status checks are required in the master ruleset, so nothing blocks merges.secrets.CACHE_VERSIONwas only used by the removedactions/cachesteps.make sync-vendorno longer exists; usemake tidy.sonar.projectVersion=1.0. SonarCloud can use the project version to define the new-code period, and I can't see this project's setting from here.🤖 Generated with Claude Code