-
Notifications
You must be signed in to change notification settings - Fork 753
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
[Breaking] Install in ~/.local/bin
instead of cargo home
#2236
Conversation
`uv` is not part of the rust toolchain nor is it usually installed or managed by cargo. Similarly, i expect that the majority of users does not have cargo installed. We should instead use a regular directory for binaries. I chose `~/.local/bin`, which is mentioned in [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) and also used by pipx. > User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place. I ran `cargo dist generate`, no changes it seems. As testing strategy, i'd create a prerelease and test windows and linux(es), while i'd need someone to test mac.
How does this work across platforms? Like what happens on Windows? |
Windows currently uses |
For what it's worth, I don't have a |
I'm cool with the directory but will it cause problems when used alongside |
Should it be |
If everybody did that it would require a PATH entry per vendor, which imo would be bad. Normally installing into |
I've realized this will break people who rely on the current installation location. I'd bundle this with other bigger changes (v0.2 probably) if possible. |
~/.local/bin
instead of cargo home~/.local/bin
instead of cargo home
Yeah I think this has some upside but also has the potential to be pretty disruptive. |
I don't care whatever default location is choosen, as long as you can choose to override it yourself. My personal preference is If I need to support non technical people on windows with a non-working python-executable in some virtualenv,
|
Just chiming in to say that I dislike tools that don't use XDG directories for caches, binaries and configs, they are a standard for a reason. |
For what it's worth with rye i went through various different choices and I ended up with one path for all platforms instead of messing with the XDG stuff or trying to find suitable locations on all platforms. It's super confusing when you need to look into different places depending on which machine you are on. I also with with |
@woutervh Is @mitsuhiko What made you choose that over |
Rye is a good example: via RYE_HOME, a user can still override the default directory and choose their own location @konstin .dotfiles are not hidden on windows? You are right, my mistake.
the goal of using venv is isolation from other venvs,
all reading ~/config//config |
|
What would you think about (sym)linking those binaries to |
We might want to take into account toolchain management design considerations e.g. |
For me it comes down to a somewhat philosophical distinction: Do we consider |
In Windows, why not use %APPDATA% folder for specific user and Program Files for everyone? |
I think we should change this someday still |
I'm also strongly in favor of getting out of the cargo brand. If we want to change it, i believe we need to do it in breaking release before |
@charliermarsh Why were you opposed to doing it in 0.2.0? |
I just didn't consider it an important change and hadn't had time to think through the consequences. How will this interact with tool installs? Do we know? |
By "important", I mean "pressing" or "time-sensitive". |
I don't see how it interacts with tool installs. I agree it's not pressing but I agree with Konsti that there is some time sensitivity in that the longer we wait there may be increased reliance on this install location downstream. |
The interaction point is: where will binaries installed by uv be placed? |
True that's a consideration and an open question. |
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
…the installer (#8420) Reviving #2236 Basically implements axodotdev/cargo-dist#287
uv
is not part of the rust toolchain nor is it usually installed or managed by cargo. Similarly, i expect that the majority of users does not have cargo installed. We should instead use a not-rust-associated directory for binaries.I chose
~/.local/bin
, which is mentioned in XDG Base Directory Specification and also used by pipx.As testing strategy, i'd create a prerelease and test windows and linux(es), while i'd need someone to test mac.