Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Uninstalling rustup deletes cargo-dist installed packages #1353

Open
epage opened this issue Aug 21, 2024 · 2 comments
Open

Uninstalling rustup deletes cargo-dist installed packages #1353

epage opened this issue Aug 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@epage
Copy link

epage commented Aug 21, 2024

Steps

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ apt-get update && apt-get install -y curl
$ curl -LsSf https://astral.sh/uv/install.sh | sh
$ source $HOME/.cargo/env
$ uvx posting  # works
$ rustup self uninstall
$ uvx posting  # fails

note: I've not run this but am basing it off of cargo-dist's generated install.sh and from rustup's source code: https://github.com/rust-lang/rustup/blob/c91692a1bdbd91663dbc5fbb1f1bdd684e711f1c/src/cli/self_update.rs#L908-L925

This is a fully reasonable set of steps. A user could experiment with rust and decide to stop but want to keep using their Python tooling that happens to be implemented in Rust.

Also, if I were making a product, I wouldn't want the implementation's language to be a part of our compatibility story

As a Cargo team member, I'm concerned about people mucking with Cargo's internals

@epage
Copy link
Author

epage commented Aug 21, 2024

imo the CARGO_HOME parts of #41 should be rejected

#287 is a potential solution but I care less about how cargo-dist solves this and more about getting out of CARGO_HOME

@Gankra
Copy link
Contributor

Gankra commented Aug 21, 2024

Great catch.

We are in fact working on this in #1233, with the first steps already in flight to make it safe for us to do this migration. However we do need things like #287 to have a good safe default home for binaries on each platform.

This default made more sense when we were a rust tool for rust programmers, but, we've outgrown it.

It's worth noting that I believe cargo-binstall also does something like this, and possibly also cargo-quickinstall (the two are strongly related). But at least in those cases you're more explicitly engaging with cargo, whereas we can do it in some random curl-sh scripts.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants