cmd/go: mod tidy panic: internal error: adding to module graph had no effect on root requirements. #73108
Labels
BugReport
Issues describing a possible bug in the Go implementation.
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go1.24.1
Output of
go env
in your module/workspace:What did you do?
Create a project to extend github.com/trimble-oss/tierceron. In this, I reference:
github.com/trimble-oss/tierceron v1.36.2
There are multiple mysteries surrounding this dependency. I think most of the problems are probably mine, but I somehow don't think that go mod tidy should panic here...
What did you see happen?
One of them leads to a go mod loadFromRoots panic.
panic: internal error: adding [github.com/trimble-oss/[email protected]] to module graph had no effect on root requirements... giant list of imports and dependencies....
cmd/go/internal/modload.loadFromRoots({0xc85b00, 0x10bb180}, {{{0x0, 0x0}, 0xc000174cc0, 0x1, 0x0, {0x0, 0x0}, 0x1, ...}, ...})
cmd/go/internal/modload/load.go:1232 +0x1839
cmd/go/internal/modload.LoadPackages({0xc85b00, 0x10bb180}, {{0x0, 0x0}, 0xc000174cc0, 0x1, 0x0, {0x0, 0x0}, 0x1, ...}, ...)
cmd/go/internal/modload/load.go:366 +0x4a8
cmd/go/internal/modcmd.runTidy({0xc85b00, 0x10bb180}, 0xc000024810?, {0xc000020230?, 0xb5d2e0?, 0xb5e094?})
cmd/go/internal/modcmd/tidy.go:133 +0x2b8
main.invoke(0x108ad80, {0xc000020230, 0x1, 0x1})
cmd/go/main.go:341 +0x845
main.main()
cmd/go/main.go:220 +0xe8b
What did you expect to see?
Some kind of nice error message indicating what's truly wrong with the structure of the project. A panic indicates an unexpected condition in the tool...
I should not that in order to work around some problems with proxy not recognizing this project, I cloned the project and did a replace in my extension project:
replace github.com/trimble-oss/tierceron => ../tierceron
The text was updated successfully, but these errors were encountered: