Repository navigation
Conversation
Go 1.25 added the `ignore` directive to go.mod. golang.org/x/mod v0.24.0 does not know it, so generation into such a module fails with "could not parse go.mod: unknown directive: ignore". Bump golang.org/x/mod to v0.29.0, the newest release that still only requires Go 1.24, and add a test for PackageForFolder with an ignore line.
orinnz
force-pushed
the
fix/gomod-ignore-directive
branch
from
October 3, 2026 12:02
8aa9285 to
3464342
Compare
stephenafamo
reviewed
Oct 6, 2026
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.
Problem
Go 1.25 added the
ignoredirective togo.mod. bob pinsgolang.org/x/modv0.24.0, which predates it, so generating into a module whosego.modcontains e.g.ignore datafails:The only workaround today is to strip the
ignorelines fromgo.modbefore running bobgen and restore them afterwards.Fix
golang.org/x/modv0.24.0 → v0.29.0. Support forignorelanded in v0.25.0; v0.29.0 is the newest release that still only needs Go 1.24, so bob'sgo 1.24.0directive is unchanged.go mod tidyalso movesx/tools,x/syncandx/sysup to match.TestPackageForFolderWithIgnoreDirectiveingen/language. It fails onmainwith the error above and passes with this change.Testing
go build ./...andgo vet ./gen/...pass.go test ./gen/language/ ./gen/drivers/ ./gen/plugins/pass.