-
Notifications
You must be signed in to change notification settings - Fork 892
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
Consider moving to platform-specific configuration directories #247
Comments
I may have missed the answer before, but why not use XDG specifications again? ( |
@gyscos It's because cargo doesn't. That's a change that all Rust tools need to make together. |
Why? The issue with cargo is that it was released using the wrong directories so now it's a lot harder to change. If rustup uses the correct directories from the start then there isn't a problem and seeing as is has to be moved anyway there isn't even any backwards compatibility issues for people using the beta. On windows for example it should be something like |
Consistency is important. If you know where one Rust tool puts its stuff you know where they all do. |
Well I reckon changing both cargo and rustup at the same time is going to be harder than just changing cargo. Is knowing where the .rustup folder is important? |
@ollie27 I think it is yes. Like with .cargo, .git etc sometimes it's convenient to poke at internals. With rustup it seems to be important to know where the toolchains are stored for example. |
Putting things in the XDG folders doesn't make them opaque and inaccessible. Printing the path to downloaded toolchains (or showing this information in a Since cargo and rustup use different folders, I'd argue consistency is already lost (it's not like we had a |
On OS X it'd be nice to use |
The preferences crate can help with finding the platform-specific app-directory base, but it is not as great as appdirs yet. Personally, I don't mind the status quo, since we have |
I'm really frustrated at the amount of projects deciding they're special snowflakes that don't need to follow standards. Let's fix this now, before rustup is out of beta, to have inertia into the right direction. |
|
exactly that’s what always happens and what frustrates me. decisions like that are implemented ad-hoc, the fixes put on backburner, and once people would have time for it there’s suddenly inertia in the wrong direction and people have built tools relying on the hacky ad-hoc behavior that was never meant to last. we have to switch now or we will do it never. and to be honest, we should have thought about that from the inception. |
i also have no idea why there should be any reason to coordinate with cargo. can’t we use XDG and cargo later? |
@brson if this is something all Rust tools should do at the same time, does that mean it's RFC material? |
@mrhota Since it impacts so much of the ecosystem moving to platform-specific locations is probably RFC worthy, yes. It's probably important to be aware of all the activity in this cargo thread. cc @alexcrichton |
@flying-sheep I prefer to keep Rust's tooling consistent about this. Cargo and rustup are very closely related. |
This thread is about moving away from the Edit: on second thought this thread is sufficiently about XDG now that I'll just change the op and make a new issue for the rename. |
cc #537 |
It's a chance to discard |
I really don't feel like screwing around with countless "special snowflake" applications, each with its own "move the profile" environment variable. I run into enough games that put their configuration files in (Ideally, the containerization, since that won't be outwitted by static linking) Regardless of whether this is fixed, I'll come up with some kind of single-command (probably at install time) solution to force things like rustup and cargo to stop making a mess, whether they like it or not. |
yeah, i also really like to do |
I just want rustup out of my home directory and into AppData. There is absolutely no reason for dot directories on Windows, especially since 1. they're a pain to work with and 2. it doesn't actually hide the folder. So please, be nice and move it to AppData, probably Local. |
@retep998 You can, of course, |
Would this change the path for configuration files for OSX users? |
I think the important discussion is exactly which directories we should be using. Obviously we should be following OS conventions where possible, that goes without saying. On Windows I think The binaries are currently installed in Cargo's bin directory which I assume is so you only have to add one thing to the I suggest moving them as well to perhaps to What do other people think? Also what directories should be used on OS X? |
@ollie27 command-line tools on OS X should use the same directories as on Linux, i.e. those defined in the XDG Base Directory spec. |
Heads up: Work on cargo is underway in rust-lang/cargo#5183. The fix for rustup will be next. |
The pull request mentioned by @soc was closed without merging... This is still an important feature |
Refs. - https://rust-lang.github.io/rustup/environment-variables.html - https://doc.rust-lang.org/cargo/reference/environment-variables.html See also: - https://wiki.archlinux.org/title/XDG_Base_Directory#Partial - rust-lang/rustup#247 - rust-lang/cargo#1734 - rust-lang/rfcs#1615 - rust-lang/cargo#5183 - rust-lang/cargo#148
For anyone interested, there's a pre-RFC in the forums: |
Many people would prefer cargo/rustup conform to various platform-specific standards for storing configuration. cc rust-lang/cargo#2127
(This issue was originally about a different subject, but is now an XDG etc. thread, some comments may make less sense out of context).
The text was updated successfully, but these errors were encountered: