-
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 list creates read-only module cache #30502
Comments
Thanks for reporting this. This is a dup of #27161 and #27455. In particular, note (from these issues):
Final decision was not to make the cache writable: #27161 (comment). Rationale was given on both of the issues I liked above. Closing here, since it's a dup and the cache is working as intended. |
Well, that's nasty annoying behaviour, that go maintainers find reasonable only because they are go maintainers, and would not accept in other programs. |
I'm not sure I understand why this is so problematic. As is explained in the issues I linked, the go commands require the cache to be in a consistent state, and the cache directories are made not writable to avoid accidental (and deliberate) corruption of the cache structure (for example when using Why can't you use |
Having a situation, where apps start creating files that can not be managed by regular system utilities with their usual options, requiring the use of app-specific commands, that may not even be available on-system anymore (because cache files are kept on-disk when commands are removed), is management hell (for humans and automated housekeeping utilities). Just list all the files in your home directory and ask yourself if you want to learn one app-specific command per app creator for basic housekeeping like removing stale/cache files. Besides, |
(and I understand the wish to force projects that got used to do very weird and brittle stuff in their unit tests to clean up their act, but creating read-only cache files by default is not a good way to achieve this) |
go list
should not create files that the user can not remove without permission surgery, that's user-hostile behaviour.The text was updated successfully, but these errors were encountered: