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

Tracking Issue for Rust 2024: Cargo deprecations #123754

Open
8 of 9 tasks
traviscross opened this issue Apr 10, 2024 · 2 comments
Open
8 of 9 tasks

Tracking Issue for Rust 2024: Cargo deprecations #123754

traviscross opened this issue Apr 10, 2024 · 2 comments
Assignees
Labels
A-edition-2024 Area: The 2024 edition C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. S-tracking-ready-to-stabilize Status: This is ready to stabilize; it may need a stabilization report and a PR T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.

Comments

@traviscross
Copy link
Contributor

traviscross commented Apr 10, 2024

This is a tracking issue for the Rust 2024-relevant parts of:

This issue is for tracking readiness for the Rust 2024 edition.

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

cc @rust-lang/cargo @epage

@traviscross traviscross added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. A-edition-2024 Area: The 2024 edition labels Apr 10, 2024
@epage epage self-assigned this Apr 11, 2024
@epage
Copy link
Contributor

epage commented Apr 11, 2024

Started a discussion for reviewing the dispositions on the deprecations at https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Deprecated.20cargo.20functionality

@epage
Copy link
Contributor

epage commented Apr 16, 2024

Tracking issue is updated with the final list of what we'll be doing for this.

bors added a commit to rust-lang/cargo that referenced this issue Apr 16, 2024
fix(toml): Error on `[project]` in Edition 2024

### What does this PR try to resolve?

`[package]` was added in 86b2a2a in the pre-1.0 days but `[project]` was never removed nor did we warn on its use until recently in #11135.  So likely we can't remove it completely but we can remove it in Edition 2024+.

This includes `cargo fix` support which is hard coded directly into the `cargo fix` command.

This is part of
- #13629
- rust-lang/rust#123754

While we haven't signed off on everything in #13629, I figured this (and a couple other changes) are not very controversial.

### How should we test and review this PR?

Per commit.  Tests are added to show the behavior changes, including in `cargo fix`.

### Additional information
bors added a commit to rust-lang/cargo that referenced this issue Apr 22, 2024
fix(toml): Report `_` fied variants (e.g. `dev_dependencies`) as deprecated

### What does this PR try to resolve?

This is prep for removing them in the 2024 Edition and is part of rust-lang/rust#123754 and #13629

This doesn't include 2024 Edition work because there is a risk of conflict with other work going on these areas.

This changes us from
- When using `-` and `_` variants: deprecated, will error some time
- Otherwise, nothing

To
- When using `-` and `_` variants: unused field warning
- When using only `_`: deprecation, will be removed in 2024

I decided to model this as an unused field warning because that is what this is and that is how any other use of `_` works.  We might hard error during a transition period but I'd eventually want these to just make the code act like anything else in the end.

### How should we test and review this PR?

### Additional information
bors added a commit to rust-lang/cargo that referenced this issue Apr 24, 2024
fix(toml): Be more forceful with underscore/dash redundancy

### What does this PR try to resolve?

This is prep for removing them in the 2024 Edition and is part of rust-lang/rust#123754 and #13629

During #13783, I had considered making the 2024 edition behavior a "unused key" warning.  However, the work and code mess to pipe the data through correctly handle the two fields in all cases didn't seem worth it (and a hard error might be better to help users transition).

### How should we test and review this PR?

### Additional information
bors added a commit to rust-lang/cargo that referenced this issue Apr 24, 2024
fix(toml): Don't double-warn when underscore is used in workspace dep

### What does this PR try to resolve?

This is prep for removing them in the 2024 Edition and is part of rust-lang/rust#123754 and #13629

Particularly, I wanted to make sure I didn't make things worse and in doing so found there was room for improvement.

### How should we test and review this PR?

### Additional information
epage added a commit to epage/cargo that referenced this issue Apr 25, 2024
epage added a commit to epage/cargo that referenced this issue Apr 26, 2024
bors added a commit to rust-lang/cargo that referenced this issue Apr 26, 2024
fix(toml): Remove underscore field support in 2024

### What does this PR try to resolve?

This is part of the 2024 Edition and is part of rust-lang/rust#123754 and #13629

### How should we test and review this PR?

### Additional information
bors added a commit to rust-lang/cargo that referenced this issue May 1, 2024
fix(toml): On 2024 Edition, disallow ignored `default-features` when inheriting

### What does this PR try to resolve?

This is part of rust-lang/rust#123754

This is a follow up to #11409 which tweaked how we do inheritance of default-features, including warning when `default-features = false` is ignored.  This turns those warnings into an error.

### How should we test and review this PR?

### Additional information
@traviscross traviscross added the S-tracking-ready-to-stabilize Status: This is ready to stabilize; it may need a stabilization report and a PR label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2024 Area: The 2024 edition C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. S-tracking-ready-to-stabilize Status: This is ready to stabilize; it may need a stabilization report and a PR T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants