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

Feature request: Make cargo-update aware of cargo-binstall #173

Closed
auronandace opened this issue Mar 11, 2022 · 9 comments
Closed

Feature request: Make cargo-update aware of cargo-binstall #173

auronandace opened this issue Mar 11, 2022 · 9 comments
Labels

Comments

@auronandace
Copy link

Would it be possible to make cargo-update aware of packages that have been installed via cargo-binstall?

Link: https://github.com/ryankurte/cargo-binstall

As a bonus it would be great if it could detect whether some packages have the option to install via cargo-binstall and display that when you use the -l option for listing updates.

@nabijaczleweli
Copy link
Owner

Closing as fundamentally impossible: cargo-binstall doesn't actually install anything, it seems, just copies stuff around:

testpsko@tarta:~$ tree -a .cargo/
.cargo/
├── bin
│   ├── cargo
│   ├── cargo-binstall
│   ├── cargo-clippy
│   ├── cargo-fmt
│   ├── cargo-miri
│   ├── clippy-driver
│   ├── rls
│   ├── rustc
│   ├── rustdoc
│   ├── rustfmt
│   ├── rust-gdb
│   ├── rust-lldb
│   ├── rustup
│   ├── sx128x-util -> sx128x-util-v0.17.2
│   └── sx128x-util-v0.17.2
├── .crates2.json
├── .crates.toml
├── env
└── .package-cache
testpsko@tarta:~$ grep -r sx128x .cargo/
grep: .cargo/bin/sx128x-util-v0.17.2: binary file matches

It's equivalent to just putting random stuff in ~/.cargo/bin, so nothing actually knows about it, not even cargo-binstall.

@Jackenmen
Copy link

Since version 0.10.0, cargo-binstall mimics cargo install's installation process of using .crates.toml and .crates2.json so that it's actually more of an install rather than just putting binaries in ~/.cargo/bin.

Is there anything else that would be needed before it's realistically possible to implement such feature?

@nabijaczleweli nabijaczleweli reopened this Aug 3, 2022
@passcod
Copy link

passcod commented Aug 3, 2022

Hi, maintainer from cargo-binstall here.

Thank you for your expert feedback, and bear with us as we take it under advisement and work to resolve issues. We do appreciate your help in making our tool more robust and understand not wanting to integrate before it feels ready.

We are not yet at 1.0.0 and are likely to have some minor breaking changes to the interface before then. If that sounds like too much trouble, do tell us and we can post here when we get to a stable place we feel comfortable calling 1.0 so an integration can further proceed. Obviously as fellow open source maintainers we'd like to avoid the annoyance of others where we can.

@nabijaczleweli
Copy link
Owner

@jack1142 can you try the current master branch (at least 558c3f5) against cargo-binstall >=0.12?

@Jackenmen
Copy link

Aside from me running into an entirely different issue while trying it (unrelated to this change, it happens on the released version of cargo-update as well, see #187), it appears to be working fine.
Due to the mentioned issue, I wasn't able to check if it handles git install fine but I imagine it would.

@nabijaczleweli
Copy link
Owner

Git installation is entirely unaffected by this, which I assume is expected?

@Jackenmen
Copy link

Yes, that's expected, just wasn't sure whether you replace all usage of cargo with binstall when available or just for packages installed from the cargo index so I didn't know if that should be tested as well.

@nabijaczleweli
Copy link
Owner

Released in v8.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants