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

Explicit crate args not appearing in update list when built locally #162

Open
jayvdb opened this issue Jul 26, 2021 · 1 comment
Open

Explicit crate args not appearing in update list when built locally #162

jayvdb opened this issue Jul 26, 2021 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Jul 26, 2021

I built cargo-make from source cargo install --path ., and then when running cargo install-update

$ cargo install-update taplo-cli cargo-make
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package    Installed  Latest  Needs update
taplo-cli  v0.4.0     v0.4.0  No

No packages need updating.
Overall updated 0 packages.

It took me a while to remember that cargo-make was built from source, and guess that was why.
So I try with --allow-no-update and now it is shown, but it is detected as not installed, when it was installed.

$ cargo install-update --allow-no-update cargo-make taplo-cli
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package     Installed  Latest   Needs update
cargo-make  No         v0.35.0  Yes
taplo-cli   v0.4.0     v0.4.0   No

Installing cargo-make
...

Curious. So I reinstall cargo-make from source, and this time use --list, and gosh-darnit it has disappeared again.

cargo install-update --list cargo-make taplo-cli
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package    Installed  Latest  Needs update
taplo-cli  v0.4.0     v0.4.0  No

--git doesnt help.

cargo install-update --list --git cargo-make taplo-cli
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package    Installed  Latest  Needs update
taplo-cli  v0.4.0     v0.4.0  No

Package  Installed  Latest  Needs update

--downdate also doesnt help.

cargo install-update --downdate cargo-make taplo-cli
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package    Installed  Latest  Needs update
taplo-cli  v0.4.0     v0.4.0  No

No packages need updating.
Overall updated 0 packages.

~.cargo/.crates.toml contains

"cargo-make 0.35.0 (path+file:///Users/john.vandenberg/rust/cargo-make)" = ["cargo-make", "makers"]

~.cargo/.crates2.json contains

{"installs":{..., "cargo-make 0.35.0 (path+file:///Users/john.vandenberg/rust/cargo-make)":{"version_req":null,"bins":["cargo-make","makers"],"features":[],"all_features":false,"no_default_features":false,"profile":"release","target":"x86_64-apple-darwin","rustc":"rustc 1.53.0 (53cb7b09b 2021-06-17)\nbinary: rustc\ncommit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b\ncommit-date: 2021-06-17\nhost: x86_64-apple-darwin\nrelease: 1.53.0\nLLVM version: 12.0.1\n"}

So it seems that the metadata exists to show locally built crates are installed, even if the version cant be trusted.

IMO a locally built version should:

  • be "upgraded" to the latest published crate if --downdate or --force is used
  • not be upgraded if it has the same version as the latest published crate, but a warning should be emitted
@nabijaczleweli
Copy link
Owner

I mean, uh, published... where? The problem with this is that you'd like to to "upgrade" across origins, which is not something that makes sense. I guess we could handle path+file:// origins, but the utility of that is questionable, since you upgrade that manually, so?

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

No branches or pull requests

2 participants