cargo: cargo update should not highlight non-semver-compatible "(latest: v0.23.5)" for indirect dependencies
Problem
I just ran my weekly cargo update against the workspace at work, and it highlighted this change:
Updating rustls v0.21.11 -> v0.21.12 (latest: v0.23.5)
This workspace does not have a direct dependency on rustls. As such, I would suggest this information isn’t actionable enough to merit a mention in the non-verbose cargo update output (it would definitely fit in with the verbose output).
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.78.0 (54d8815d0 2024-03-26)
release: 1.78.0
commit-hash: 54d8815d04fa3816edc207bbc4dd36bf18014dbc
commit-date: 2024-03-26
host: aarch64-apple-darwin
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.4.0 (sys:0.4.72+curl-8.6.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 14.4.1 [64-bit]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (16 by maintainers)
Commits related to this issue
- feat(update): Report when incompatible-rust-version packages are selected In discussin this in #13873, it highlighted that we need to make sure we tell people when we get in this state. I decided to... — committed to epage/cargo by epage 2 years ago
- feat(update): Report when incompatible-rust-version packages are selected In discussin this in #13873, it highlighted that we need to make sure we tell people when we get in this state. I decided to... — committed to epage/cargo by epage 2 years ago
- feat(update): Report when incompatible-rust-version packages are selected In discussin this in #13873, it highlighted that we need to make sure we tell people when we get in this state. I decided to... — committed to epage/cargo by epage 2 years ago
- feat(update): Report when incompatible-rust-version packages are selected In discussin this in #13873, it highlighted that we need to make sure we tell people when we get in this state. I decided to... — committed to epage/cargo by epage 2 years ago
- Auto merge of #14401 - epage:required-rust, r=weihanglo feat(update): Report when incompatible-rust-version packages are selected ### What does this PR try to resolve? In discussin this in #13873, ... — committed to rust-lang/cargo by bors 2 years ago
- Auto merge of #14401 - epage:required-rust, r=weihanglo feat(update): Report when incompatible-rust-version packages are selected ### What does this PR try to resolve? In discussin this in #13873, ... — committed to rust-lang/cargo by bors 2 years ago
- Auto merge of #14401 - epage:required-rust, r=weihanglo feat(update): Report when incompatible-rust-version packages are selected ### What does this PR try to resolve? In discussin this in #13873, ... — committed to rust-lang/cargo by bors 2 years ago
- Auto merge of #14440 - epage:report, r=Muscraft refactor(update): Prepare for smarter update messages ### What does this PR try to resolve? This is to make it easier to - Make #14401 path aware - W... — committed to rust-lang/cargo by bors 2 years ago
- fix(resolve): With `latest` message, differentiate actionable updates Instead of always listing the absolute latest version as a warning color, we now differentiate - compatible updates are always ac... — committed to epage/cargo by epage 2 years ago
- Auto merge of #14461 - epage:actionable, r=Muscraft fix(resolve): With `latest` message, differentiate actionable updates ### What does this PR try to resolve? Instead of always listing the absolut... — committed to rust-lang/cargo by bors 2 years ago
- Auto merge of #14471 - epage:msrv, r=ehuss feat(resolve): Report MSRV compatible version instead of incomptible ### What does this PR try to resolve? This expands on #14461 to where only MSRV-compa... — committed to rust-lang/cargo by bors 2 years ago
- fix(resolve): With `latest` message, differentiate actionable updates Instead of always listing the absolute latest version as a warning color, we now differentiate - compatible updates are always ac... — committed to antoniospg/cargo by epage 2 years ago
- feat(update): Report when incompatible-rust-version packages are selected In discussin this in #13873, it highlighted that we need to make sure we tell people when we get in this state. I decided to... — committed to antoniospg/cargo by epage 2 years ago
- fix(resolve): With `latest` message, differentiate actionable updates Instead of always listing the absolute latest version as a warning color, we now differentiate - compatible updates are always ac... — committed to dingxiangfei2009/cargo by epage 2 years ago
- fix(resolve): Don't list transitive, incompatible dependencies as available This is part of #13908 — committed to epage/cargo by epage 2 years ago
- Auto merge of #14568 - epage:message, r=weihanglo fix(resolve): Don't list transitive, incompatible dependencies as available ### What does this PR try to resolve? We have limited capability to cle... — committed to rust-lang/cargo by bors 2 years ago
This seems like bad reasoning, since
cargo update --verbosereveals a bunch more crates that similarly have semver-incompatible versions (but somehow these are not being shown without--verbose):I suppose that the
(latest ..)notice for rustls is only shown because there was a semver-compatible bump, but IMO that’s not a good reason to also show the(latest ..)notice for non-direct semver-incompatible versions.If anything, I would be happy if you showed Unchanged semver-incompatible bumps for my workspace’s direct dependencies, but it currently doesn’t – so that also feels inconsistent.
To summarize:
(latest ..)if the latest version is semver-incompatible with the selected version (because that doesn’t fit in with the scope ofcargo update)(latest ..)notices advertising a version that is semver-incompatible with the selected version, making it green instead?cargo update --verboseit’s not obvious to me that it makes sense to show(latest ..)notices for semver-incompatible versions, since that’s historically outside of the scope ofupdatecargo updateto help users address semver-incompatible bumps, and one good way to go about that would be to start noting available semver-incompatible updates for direct dependencies using a(latest ..)notice independent from if the dependency got updated(I happen to do a lot of this, trying to push the ecosystem forward – but I think I’m in a small minority, and anyway it’s still a different level of actionable/effort to effect changes like this, so any production user will have to timebox these efforts.)
(cc @epage who’s done a lot of work in this area.)
Sorry for the delay, I’ve been doing some focused time trying to wrap things up before I get to my 100+ github notifications between MSRV, 2024 Edition, and RustNL (wish timing worked to talk to you in person about this).
This also caused confusion in https://github.com/rust-lang/cargo/issues/13873#issuecomment-2100460976
This was previously discussed in #13372. The idea behind this comes from
cargo upgradeintocargo update(#12425)I’d have to check the implementation and issues, but I have a feeling this runs counter to the feedback you gave for
cargo upgrade.CC @jonhoo as you mentioned in the release changes stream your excitement for reporting changes and want to make sure we capture multiple perspectives