Skip to content
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

On clean update binary proxies #72

Merged
merged 8 commits into from
Jan 8, 2025

Conversation

amanjeev
Copy link
Member

@amanjeev amanjeev commented Jan 6, 2025

This was quick when you figure out where things are already done. A small one.

Testing

Start with a clean state.json.

For best results, delete the entire criticalup installation directory.

Install project 1

Use this manifest to install first project. Name this file project1.toml.

manifest-version = 1

[products.ferrocene]
release = "stable-24.11.0"
packages = [
    "cargo-${rustc-host}",
    "rustc-${rustc-host}",
    "flip-link-${rustc-host}",
]

Install project 2

Use this manifest to install first project. Name this file project2.toml.

This is same as above except flip-link is removed.

manifest-version = 1

[products.ferrocene]
release = "stable-24.11.0"
packages = [
    "cargo-${rustc-host}",
    "rustc-${rustc-host}",
]

Check binary proxies

You should see following binary proxies:

  • cargo
  • flip-link
  • rustc
  • rustdoc
  • rust-gdb
  • rust-gdbgui
  • rust-lldb

Remove project 1

cargo run -q remove --project project1.toml.

This will remove the project from state file but won't clean up. For cleaning up, we run clean command next.

Run clean command

cargo run -q clean

You should see flip-link binary proxy removed; you should see the following binary proxies.

  • cargo
  • rustc
  • rustdoc
  • rust-gdb
  • rust-gdbgui
  • rust-lldb

This should show that only flip-link was removed because all other binary proxies were still being referenced by another installation (project 2).

@amanjeev amanjeev self-assigned this Jan 6, 2025
@amanjeev amanjeev requested a review from Hoverbear January 7, 2025 16:54
Comment on lines +30 to +35
if proxy_binary.is_dir() {
return Err(BinaryProxyUpdateError::ProxyBinaryShouldNotBeDir(
proxy_binary.into(),
));
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hoverbear Added a little check to make sure what is passed is not a dir.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@Hoverbear Hoverbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest looks good

amanjeev and others added 3 commits January 7, 2025 16:09
Reviewed-by: Ana Hobden <ana.hobden@ferrous-systems.com>

Co-authored-by: Ana Hobden <operator@hoverbear.org>
Reviewed-by: Ana Hobden <ana.hobden@ferrous-systems.com>

Co-authored-by: Ana Hobden <operator@hoverbear.org>
Reviewed-by: Ana Hobden <ana.hobden@ferrous-systems.com>
@amanjeev amanjeev requested a review from Hoverbear January 7, 2025 22:03
@Hoverbear
Copy link
Member

bors merge

@bors-ferrocene
Copy link
Contributor

bors-ferrocene bot commented Jan 8, 2025

Build succeeded:

@bors-ferrocene bors-ferrocene bot merged commit 163795f into main Jan 8, 2025
13 checks passed
@bors-ferrocene bors-ferrocene bot deleted the amanjeev/on-clean-update-binary-proxies branch January 8, 2025 18:29
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.

2 participants