Skip to content

fix(uninstall): reuse resolved cargo home during cleanup - #5091

Merged
ChrisDenton merged 1 commit into
rust-lang:mainfrom
Cloud0310:uninstall-cargo-home
Sep 17, 2026
Merged

ChrisDenton merged 1 commit into
rust-lang:mainfrom
Cloud0310:uninstall-cargo-home

Conversation

@Cloud0310

Copy link
Copy Markdown
Contributor

Reuse cargo home resolution result in APIs.
Part of #5056.

@ChrisDenton
ChrisDenton added this pull request to the merge queue Sep 17, 2026
Merged via the queue into rust-lang:main with commit 02a69d7 Sep 17, 2026
32 checks passed
@Cloud0310
Cloud0310 deleted the uninstall-cargo-home branch September 17, 2026 03:27
@rami3l

rami3l commented Sep 17, 2026

Copy link
Copy Markdown
Member

@Cloud0310 What is the rationale of this PR? As I see it, it doesn't always remove the implicit dependency on process.cargo_home(), because functions like do_remove_from_path() still rely on it?

@Cloud0310

Cloud0310 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Here, the purpose is for later allowing passing down the actual bin path for clean up later in future PR. But as for do_remove_path the final view is kinda different from others. It's also carrying the duty of resolving home and the location of legacy rc files via shell::legacy_paths(process).
So this part isn't included as this would require further modification.

I would re-check on this, then make another fix.

@rami3l

rami3l commented Sep 17, 2026

Copy link
Copy Markdown
Member

@Cloud0310 I see. In that case I think it'd be beneficial to resolve all data dependencies upfront, rather than passing both process and cargo_home which might be a bit confusing because I have the feeling that the latter subsumes the former. You can do this in a subsequent PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants