go/types: Config.Check tries to create go.sum #33541
Labels
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
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?
Using type
types.Config.Check()
on a file importing a package withgo.mod
but withoutgo.sum
causes an attempt to write the missinggo.sum
file. I realize not havinggo.sum
is a mistake on the repo maintainer side, but there are projects like that out there and they're used. This in turns causes problems in applications that depend on the type-checker to find out some information about source code (e.g. ObjectBox code generator).See https://github.com/vaind/go-type-checker-issues for a minimal example that shows the issue. Try running the following code as a non-root user on linux:
Interestingly a combination of go get & go test works fine, but unfortunately that doesn't solve the problem if you have such imports in your own project...
What did you expect to see?
I expect the type checker wouldn't try to create a missing
go.sum
file.The text was updated successfully, but these errors were encountered: