cmd/go: go mod tidy removes entries from go.sum needed to execute "go run foo/bar" where "foo" is a required module #45552
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a module A that depends on module B and uses packages from module B.
However module B also has a command line tool, lets call it B/cmd/tool.
When trying to execute
go run B/cmd/tool
while within module A,for some reason it errors about a missing
go.sum
entry.Doing a
go get B/cmd/tool
adds said entry, howevergo mod tidy
will remove it.Reproduction instructions:
clone https://github.com/goarrg/examples at hash
1619449c9504a019bbf8299de082bd21bfade42a
go mod tidy
-> removes entry fromgo.sum
go run goarrg.com/cmd/goarrg
-> output at bottom of issueWhat did you expect to see?
No change that would result in me not being able to do a
go run ...
What did you see instead?
Entry in
go.sum
deleted which results ingo run ...
erroring about a missing entry.The text was updated successfully, but these errors were encountered: