-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Use OS-native config, cache home directories #1734
Comments
Have been stumped by this as well. Looked for Cargo's config in |
@0X1A If the respective |
Is someone working on this ? The more we wait, the more difficult it will be to change the default. |
@Yamakaky AFAIK there isn't anything being done about it |
You can use my xdg crate to implement this. |
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html http://www.freedesktop.org/software/systemd/man/file-hierarchy.html Strategy for backward-compatiblity: When checking for the relevant cargo directories, check in the following order of preference: 1) Use the environment variable `CARGO_HOME`. 2) Use the XDG directories if they exist. 3) Use the legacy location (~/.cargo) if it exists. 4) Fall back the XDG directories if everything else fails. Fixes rust-lang#1734.
cargo install now installs into |
... and it really should use |
Strategy for backward-compatiblity: When checking for the relevant Cargo directories, check in the following order of preference: 1) Use the environment variable `CARGO_HOME`. 2) Use the platform-specific directories if they exist. 3) Use the legacy location (~/.cargo) if it exists. 4) Fall back to the platform-specific directories if everything else fails. The new platform-specific directories are as follows: On Windows, use `AppData\Local\Temp\Cargo` for cache files (obtained via `GetTempPath`), `AppData\Roaming\Cargo` for the config files (`FOLDERID_RoamingAppData`) and `AppData\Local\Programs\Cargo` for installed binaries (`FOLDERID_UserProgramFiles`). On Unixy systems, use the XDG spec: `~/.cache/cargo` for cache files, `~/.config/cargo` for config, `~/.local/bin` for installed binaries. http://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html http://www.freedesktop.org/software/systemd/man/file-hierarchy.html On OS X, use `~/Library/Caches/Cargo` for cache files, `~/Library/Cargo` for config files and `~/Library/Cargo/bin` for binary files. Fixes rust-lang#1734. Fixes rust-lang#1976.
This comment has been minimized.
This comment has been minimized.
@Stebalien Waiting for rust-lang/rfcs#1615. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Another issue with not respecting XDG: backups. My current backup profiles knows that it should avoid |
This comment has been minimized.
This comment has been minimized.
If anyone wants to help, the already-mentioned pre-RFC is the first step toward a solution, though it is still under discussion and hasn't reached a consensus yet. The original author of that post (epage) doesn't seem to have time to work on it, so it probably needs some other folks to take care of it. |
This comment has been minimized.
This comment has been minimized.
To make it more discoverable, I've added a link to my Pre-RFC to the issue. I've also updated the Pre-RFC Motivation section with additional constraints XDG support is operating under that make this non-trivial. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Moderator note: It's ok to be angry and frustrated. So are the maintainers at the sheer number of things that need doing and fixing and that they don't get to. Priorities and maintainers change, things fall under the bus. That's life. It's not as easy as just deciding to fix this issue, even if it may seems so from the outside. Please stay on topic, this meta discussion serves no point other than venting, use your private spaces for that. I'm aware a multi hundred comment issue with a linked RFC with lots of comments is not enjoyable to read to get the full picture. So a contribution that needs no rust knowledge would be to write a summary of the RFC discussion and open discussion items on the RFC. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I also started a thread to discuss the matter of who is responsible for fixing bugs like this and when: https://internals.rust-lang.org/t/rusts-responsibility-to-engage-in-good-neighborly-behavior/22193 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Moderator note: this is not productive. In what open source community has it ever helped to just comment more and more about something that everyone is aware of? I don't want further discussion here, the internals threads are staying unhidden. Further venting here will result in temporary bans for cooling off |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
FWIW for people interested in trying to figure out this problem, Josh Triplett wrote a pretty good summary of the concerns here. It does not drill into the specifics of the various challenges; it talks about the non-obvious sources of the challenges, but it also alludes to current efforts to work on this. If people are interested in knowing more, I would suggest engaging with Josh in that thread. AIUI even writing something up about "what has been tried already, what work needs to be done, what are good areas of research" requires a fair amount of work but it might be valuable for people in the know to do that and potentially list it in the header of this issue so that there is food for collaboration. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Since I'm gonna mark some more things as off-topic now, here's some information about how discussions/issues are supposed to be performed/used and how and why we're moderating things as we are:
|
Question for mods, if someone wants to help with this issue, how can one help? I saw the https://internals.rust-lang.org/t/pre-rfc-split-cargo-home/19747/62 thread and assuming I'm assuming it's related. What are steps new contributors can help with? |
Less mods and more Cargo team. The biggest questions right now are around rustup. This will involve both understanding what rustup does and why, exploring options, and bouncing those options off of the two teams. I was planning to have that talk with them in-person at the All Hands in May |
Maintainer's notes:
For Linux-like systems, we should be using XDG. See arch's wiki for a non-exhaustive list of software with varying degrees of compliance.
For Windows, everything should go in ~/appdata/locallow or ~/appdata/local,since ~/.cargo is just a cache, AFAICT. This is
FOLDERID_LocalAppData
forSHGetKnownFolderPath
,CSIDL_LOCAL_APPDATA
forSHGetFolderPath
, and%LOCALAPPDATA%
in the environment.The text was updated successfully, but these errors were encountered: