Skip to content

fix(update)!: Remove unstable --breaking - #17333

Merged
weihanglo merged 1 commit into
rust-lang:masterfrom
epage:breaking-breaking
Aug 13, 2026
Merged

fix(update)!: Remove unstable --breaking#17333
weihanglo merged 1 commit into
rust-lang:masterfrom
epage:breaking-breaking

Conversation

@epage

@epage epage commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

Tor did a lot of great work on this within the constraints they had. The problem is what they uncovered through development: challenges with the current model for update and what I at least see as the ideal model for update --breaking (#14259).

I think we need to more closely examine the semantics of cargo update to understand what we want out of both.

I also think seeing uv lock opens up new design possibilities that give us some more flexibility. We don't have to restrict ourselves to the interface of cargo update but can deprecate cargo update in favor of a cargo lock upgrade and add a cargo upgrade command.

This is in enough of a half-working state, that I think its fine to push people back to cargo upgrade that are using it.
The tracking issue is fairly quiet.

By removing this, we also simplify discussion of expectations of other features that overlap, like min-publish-age.
Technically, support in --breaking for min-publish-age wouldn't block min-publish-age but it represents one more thing we need to track and do to get it ready for stabilization.

Closes #14259
Closes #14140

How to test and review this PR?

The references to this that I did find are:

Followup: #12425 needs to be updated to reflect this

Tor did a lot of great work on this within the constraints they had.
The problem is what they uncovered through development: challenges with
the current model for `update` and what I at least see as the ideal
model for `update --breaking` (rust-lang#14259).

I think we need to more closely examine the semantics of `cargo update`
to understand what we want out of both.

I also think seeing `uv lock` opens up new design possibilities that
give us some more flexibility. We don't have to restrict ourselves to
the interface of `cargo update` but can deprecate `cargo update` in
favor of a `cargo lock upgrade` and add a `cargo upgrade` command.

This is in enough of a half-working state, that I think its fine to push
people back to `cargo upgrade` that are using it.
The tracking issue is fairly quiet.

By removing this, we also simplify discussion of expectations of other
features that overlap, like min-publish-age.
Technically, support in `--breaking` for min-publish-age wouldn't block
min-publish-age but it represents one more thing we need to track and do
to get it ready for stabilization.

The references to this that I did find are:
- https://stackoverflow.com/questions/78514306/how-do-i-tell-cargo-to-update-dependencies-beyond-the-current-versions-of-my-pro/78514408
- https://github.com/thewh1teagle/vibe/blob/main/docs/building.md#update-packages
- A handful of crates with this in their justfile, like https://docs.rs/crate/pmtiles/0.20.0/source/justfile

Closes rust-lang#14259
Closes rust-lang#14140

Followup: rust-lang#12425 needs to be updated to reflect this
@rustbot

rustbot commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @epage, @weihanglo
  • @epage, @weihanglo expanded to epage, weihanglo

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues Command-update S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 7, 2026

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable. I love deleting code.

Anyway, we need an FCP to delete this.

View changes since this review

@weihanglo weihanglo added the T-cargo Team: Cargo label Aug 8, 2026
@weihanglo

Copy link
Copy Markdown
Member

@rfcbot fcp merge T-cargo

tl;dr: New tools has brought new ideas and possibilities. We can step back a bit and rethink a better interface

The downside is while --breaking is not widely spread, it has been mentioned and adopted in a couple of places.

See the PR description for details.

@rust-rfcbot

rust-rfcbot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

@weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period An FCP proposal has started, but not yet signed off. disposition-merge FCP with intent to merge labels Aug 8, 2026
Comment thread doc/book/src/reference/unstable.md
@epage
epage force-pushed the breaking-breaking branch from da52e81 to 31bd551 Compare August 10, 2026 17:09
@rustbot

This comment has been minimized.


## update-breaking

The `cargo update -Zunstable-options --breaking` flag has been removed in 1.99-nightly.

@epage epage Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs updating if this slips into the next release

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely to slip, though if it gets enough signoff today I'll just merge this. Doesn't need to wait 10 more days.

epage added a commit to epage/cargo that referenced this pull request Aug 10, 2026
To ensure dependencies have had a chance to be scanned, a user can set:
```toml
[registry]
global-min-publish-age = "7 days"
```
To force a critical update through, a user can
```console
$ CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update -p foo
```
That will be preserved within the lockfile.

To ensure users can observe what is going on and address concerns,
- Locking messages notify of:
  - That min-publish-age is in use and what the age is if there is a
    single one
  - a newer, unpicked version is available and its age
  - a version is being used that is incompatible with min-publish-age
    (either through `allow` or an unchange dep shown through `-v`)
- Error messages notify of:
  - a newer, unpicked version is available and its age
  - a compatible version requirement to downgrade to
  - how to use `CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE`

Items from the tracking issue:
- `deny` precedence between this and `incompatible-rust-version`: we can
  always adjust this over time
- the `registry.min-publish-age` / `registries.*.min-publish-age` precedence rule: mimics credential providers
- `cargo install` behavior
  - there was some confusion over what was being stabilized due to edits
    that happened during the FCP that weren't noticed
  - `resolver` is defined as not affecting `cargo install` which this
    preserves, just like `incompatible-rust-version`
- `cargo update --breaking`: this feature is being stabilized first and
  the other is being considered for removal (rust-lang#17333)

Fixes rust-lang#17009
@weihanglo weihanglo moved this to FCP merge in Cargo status tracker Aug 11, 2026
@epage
epage force-pushed the breaking-breaking branch from 31bd551 to 16a1c5b Compare August 12, 2026 18:59
@rustbot

rustbot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

epage added a commit to epage/cargo that referenced this pull request Aug 12, 2026
To ensure dependencies have had a chance to be scanned, a user can set:
```toml
[registry]
global-min-publish-age = "7 days"
```
To force a critical update through, a user can
```console
$ CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update -p foo
```
That will be preserved within the lockfile.

To ensure users can observe what is going on and address concerns,
- Locking messages notify of:
  - That min-publish-age is in use and what the age is if there is a
    single one
  - a newer, unpicked version is available and its age
  - a version is being used that is incompatible with min-publish-age
    (either through `allow` or an unchange dep shown through `-v`)
- Error messages notify of:
  - a newer, unpicked version is available and its age
  - a compatible version requirement to downgrade to
  - how to use `CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE`

Items from the tracking issue:
- `deny` precedence between this and `incompatible-rust-version`: we can
  always adjust this over time
- the `registry.min-publish-age` / `registries.*.min-publish-age` precedence rule: mimics credential providers
- `cargo install` behavior
  - there was some confusion over what was being stabilized due to edits
    that happened during the FCP that weren't noticed
  - `resolver` is defined as not affecting `cargo install` which this
    preserves, just like `incompatible-rust-version`
- `cargo update --breaking`: this feature is being stabilized first and
  the other is being considered for removal (rust-lang#17333)

Fixes rust-lang#17009
epage added a commit to epage/cargo that referenced this pull request Aug 12, 2026
To ensure dependencies have had a chance to be scanned, a user can set:
```toml
[registry]
global-min-publish-age = "7 days"
```
To force a critical update through, a user can
```console
$ CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update -p foo
```
That will be preserved within the lockfile.

To ensure users can observe what is going on and address concerns,
- Locking messages notify of:
  - That min-publish-age is in use and what the age is if there is a
    single one
  - a newer, unpicked version is available and its age
  - a version is being used that is incompatible with min-publish-age
    (either through `allow` or an unchange dep shown through `-v`)
- Error messages notify of:
  - a newer, unpicked version is available and its age
  - a compatible version requirement to downgrade to
  - how to use `CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE`

Items from the tracking issue:
- `deny` precedence between this and `incompatible-rust-version`: we can
  always adjust this over time
- the `registry.min-publish-age` / `registries.*.min-publish-age` precedence rule: mimics credential providers
- `cargo install` behavior
  - there was some confusion over what was being stabilized due to edits
    that happened during the FCP that weren't noticed
  - `resolver` is defined as not affecting `cargo install` which this
    preserves, just like `incompatible-rust-version`
- `cargo update --breaking`: this feature is being stabilized first and
  the other is being considered for removal (rust-lang#17333)

Fixes rust-lang#17009
@rust-rfcbot rust-rfcbot added final-comment-period FCP — a period for last comments before action is taken and removed proposed-final-comment-period An FCP proposal has started, but not yet signed off. labels Aug 13, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to merge this and skip the 10 days FCP.

Reason being: Unlike build-plan, which we spent effort on communicating the removal. The --breaking flag has well-known, battle-tested alternatives like cargo upgrade from cargo-edit, and dependabot/renovate for CI auto upgrades. Users have the migration paths.

Sorry for the inconvenience if your workflow already adopted this, and thanks for being testers for nightly features.

View changes since this review

@weihanglo
weihanglo added this pull request to the merge queue Aug 13, 2026
Merged via the queue into rust-lang:master with commit 691958b Aug 13, 2026
73 of 87 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 13, 2026
epage added a commit to epage/cargo that referenced this pull request Aug 13, 2026
To ensure dependencies have had a chance to be scanned, a user can set:
```toml
[registry]
global-min-publish-age = "7 days"
```
To force a critical update through, a user can
```console
$ CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update -p foo
```
That will be preserved within the lockfile.

To ensure users can observe what is going on and address concerns,
- Locking messages notify of:
  - That min-publish-age is in use and what the age is if there is a
    single one
  - a newer, unpicked version is available and its age
  - a version is being used that is incompatible with min-publish-age
    (either through `allow` or an unchange dep shown through `-v`)
- Error messages notify of:
  - a newer, unpicked version is available and its age
  - a compatible version requirement to downgrade to
  - how to use `CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE`

Items from the tracking issue:
- `deny` precedence between this and `incompatible-rust-version`: we can
  always adjust this over time
- the `registry.min-publish-age` / `registries.*.min-publish-age` precedence rule: mimics credential providers
- `cargo install` behavior
  - there was some confusion over what was being stabilized due to edits
    that happened during the FCP that weren't noticed
  - `resolver` is defined as not affecting `cargo install` which this
    preserves, just like `incompatible-rust-version`
- `cargo update --breaking`: this feature is being stabilized first and
  the other is being considered for removal (rust-lang#17333)

Fixes rust-lang#17009
@epage
epage deleted the breaking-breaking branch August 13, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues Command-update disposition-merge FCP with intent to merge final-comment-period FCP — a period for last comments before action is taken T-cargo Team: Cargo

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants