-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: go clean --modcache downloads modules before cleaning #28680
Comments
We should definitely not download modules during |
Why is this trying to analyze the go.mod and dependency? Can't it simply delete the cache directory? I wondered if it was trying to delete modules selectively (for unknown reasons), but it turned out not. The whole directory under my default GOPATH was gone after the command. |
I'm not sure. If we figure that out, I think that will point to the fix. 🙂 |
I was having a similar problem with |
This turned out to be really complicated.
In order to figure out which files are in the package, the The loader, in turn, computes the MVS build list, which means it needs to resolve all of the I think for a proper fix we'll need to rework the interaction between the |
Change https://golang.org/cl/153818 mentions this issue: |
This change encodes the current behavior in mod_clean_cache.txt. A fix for that behavior will probably have to wait for 1.13. Updates #28680 Change-Id: I216b5a783971309cc75187502bddccc58c3a9c35 Reviewed-on: https://go-review.googlesource.com/c/153818 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Change https://golang.org/cl/167717 mentions this issue: |
Maybe working as intended. But this command output doesn't mention anything about the cleaning operation but is chatty about module downloading. That is confusing, especially when the go.mod has errors so the messages end with error reports.
For example, the following is the message I get when I attempted to clean up the module cache with problematic go.mod (referencing non-existing versions). The module cache got empty, but the message is confusing.
The text was updated successfully, but these errors were encountered: