Add capability of making breaking changes in `update --precise`
Implements the second half of #12425.
With the unstable-options feature enabled, cargo update --precise will allow making upgrades/downgrades that require changes to be made to the manifest files, similar to cargo update --breaking.
Blocked on #14259. See https://github.com/rust-lang/cargo/pull/14140/files#r1682381732.
r? @weihanglo
rustbot has assigned @weihanglo. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
Should we wait for #14049, or this can be reviewed independently?
The 4 new commits here can be reviewed. I think #14049 is close to being merged anyway.
The 4 new commits here can be reviewed. I think https://github.com/rust-lang/cargo/pull/14049 is close to being merged anyway.
In the future, please make a blocking thing like that explicit either by making this a draft or opening an issue on an arbitrary part of the code.
In https://github.com/rust-lang/cargo/issues/12425#issuecomment-2186198258, this PR was marked as addressing
Consider an error message if the command completed without doing any upgrades.
Except this PR description does not include an explanation as to why this PR addresses that and why an error is not the way forward
(btw probably best not to mark things as done when they aren't merged as things can change especially when the "solution" is not decided yet)
Except this PR description does not include an explanation as to why this PR addresses that and why an error is not the way forward
Description updated.
(btw probably best not to mark things as done when they aren't merged as things can change especially when the "solution" is not decided yet)
Got it.
Description updated.
I'm still not seeing the description talk to
why an error is not the way forward
btw it would be good to focus on user impact and not implementation. The paragraph that alludes to this starts off by discussing the implementation which someone is likely to gloss over when looking for user impact.
:umbrella: The latest upstream changes (presumably #14049) made this pull request unmergeable. Please resolve the merge conflicts.
Description updated.
I'm still not seeing the description talk to
why an error is not the way forward
I have updated the task list. Hope that's OK.
This is ready for another look now.
Except this PR description does not include an explanation as to why this PR addresses that and why an error is not the way forward
Description updated.
The PR says:
This PR is making a change that also affects cargo update --breaking. We'll reuse ops::update_lockfile() for both breaking and non-breaking updates. The benefit is more consistent output and behaviour between the two. In particular, it addresses a task about an error output if there is nothing to upgrade. See https://github.com/rust-lang/cargo/issues/12425#issuecomment-2186198258.
This is focused on the implementation, glosses over the reason, and doesn't say what is being changed.
I think its best to split this out from this PR, either making ti independent or making one depend on the other. Trying to slip it in like this is making it harder to review and discuss both.
:umbrella: The latest upstream changes (possibly 081d7bac633bbc72883fb74fb4993bb1b1a2df4a) made this pull request unmergeable. Please resolve the merge conflicts.