cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Add capability of making breaking changes in `update --precise`

Open torhovland opened this issue 1 year ago • 11 comments

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.

torhovland avatar Jun 25 '24 09:06 torhovland

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

rustbot avatar Jun 25 '24 09:06 rustbot

Should we wait for #14049, or this can be reviewed independently?

weihanglo avatar Jun 26 '24 03:06 weihanglo

The 4 new commits here can be reviewed. I think #14049 is close to being merged anyway.

torhovland avatar Jun 26 '24 06:06 torhovland

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.

epage avatar Jun 27 '24 10:06 epage

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)

epage avatar Jun 27 '24 10:06 epage

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.

torhovland avatar Jun 27 '24 11:06 torhovland

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.

epage avatar Jun 27 '24 11:06 epage

:umbrella: The latest upstream changes (presumably #14049) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Jun 27 '24 11:06 bors

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.

torhovland avatar Jul 01 '24 10:07 torhovland

This is ready for another look now.

torhovland avatar Jul 01 '24 12:07 torhovland

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.

epage avatar Jul 12 '24 20:07 epage

:umbrella: The latest upstream changes (possibly 081d7bac633bbc72883fb74fb4993bb1b1a2df4a) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Dec 20 '24 15:12 rustbot