New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: changes/corruption in module cache not detected #37242
Comments
I think you're after
I believe that other commands like This is explained a bit in
Also:
If that is your problem, I think we should investigate it. Until the bug is investigated, |
I did not know about that one. Running that one on the project above gives:
But I think this boils down to this:
|
Most of what you describe is working as intended. The integrity of module zip files is verified when they are downloaded and extracted into the cache. The Files and directories within the cache are marked read-only to prevent accidental changes (unless the
Could you explain more? Is the whole cache empty ( The |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Note: to me this is a functional problem, I'm not using the "security" word.
See environment info at the bottom.
To reproduce:
Run this to generate a
go.sum
fileThen manually edit
$GOPATH/pkg/mod/github.com/bep/testmodlib@v1.0.0/lib.go
to make theHello
func returnmodified
(or whatever).¨
Then rerun the program above. It now prints `modified´.
Since I have a
go.sum
file for that library, I would expect the build to fail.The reason I raise this is that I on rare occasions have seen empty cache folders. I'm not able to give further details about when/how this happens, but for me, it happens only on
MacOS
. In most situations, this will be visible (break the build), but not always.The text was updated successfully, but these errors were encountered: