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

Unstable updates #9092

Merged
merged 9 commits into from
Jan 21, 2021
Merged

Unstable updates #9092

merged 9 commits into from
Jan 21, 2021

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jan 21, 2021

This is a collection of updates for unstable/nightly feature support, intended to provide better messages for users and better internal and external documentation. Separated by commit, in summary:

  • Added comments and new docstrings for improved internal documentation.
  • Added new documentation to the reference guide on how unstable things work.
    • Also added redirects for stabilized features so any external links won't be broken.
  • Add a targeted error message if you put cargo-features in the wrong place in Cargo.toml.
  • Remove publish-lockfile. The feature was stabilized without the key in Stabilize publish-lockfile. #7026 about 1.5 years ago. Also added "removed" support for features, which prints out a more helpful error message.
  • Add help messages about stabilized -Z flags (instead of spitting out an unhelpful error message).
  • Add help messages about stabilized cargo-features features.
  • Add more context to the error when using cargo-features on stable.
  • Unhide nightly CLI flags. I changed my mind on how these should work. I think it is useful to "advertise" the existence of these options on stable. The error message if you try to use it should help guide on what to do.

Closes #9074.

I changed my mind on how these should work. I think it is useful to
"advertise" the existence of these options on stable. The error message
if you try to use it should help guide on what to do.
This is intended to help if the user puts cargo-features in the
wrong place in Cargo.toml.
The feature was stabilized without the key in rust-lang#7026 about 1.5 years ago.
(Will follow up with an error message in a subsequent commit.)
Previously, when something was stabilized, Cargo would spit out a very
unhelpful error message about an unknown -Z flag. This changes it so
that it displays a helpful warning (or error).
* Add `removed` support.
* Include the version where it is stabilized.
* Include a links to the documentation in the error/warning messages.
Attempts to make it clearer on how the different kinds of unstable
support works, and clarify the steps for adding new features
and stabilizing.
This attempts to make it clearer on the different ways
unstable features can be activated.
This adds some redirects so if there are any links to old documentation,
they will get redirect to new documentation.
@rust-highfive
Copy link

r? @Eh2406

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 21, 2021
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Looks great to me!

"#features": "features.html#feature-resolver-version-2",
"#package-features": "features.html#resolver-version-2-command-line-flags",
"#resolver": "resolver.html#resolver-versions",
};
Copy link
Member

Choose a reason for hiding this comment

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

Is this a backwards-compatibility thing? This sems like something that may be hard to keep up-to-date over time perhaps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, for example if someone posts a URL on a forum, this will ensure that link doesn't become confusing after the feature gets stabilized. It might still be confusing, but hopefully people will figure it out. If these break over time, I don't think it's a big deal. I can also probably teach the linkchecker to check these, though that's a bit tricky.

Copy link
Member

Choose a reason for hiding this comment

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

Ok that's what I figured, and that sounds good to me. That means it's not super critical we keep a ton of stuff here.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Jan 21, 2021

📌 Commit a58e7ff has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2021
@bors
Copy link
Collaborator

bors commented Jan 21, 2021

⌛ Testing commit a58e7ff with merge ba3311e...

@bors
Copy link
Collaborator

bors commented Jan 21, 2021

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing ba3311e to master...

@bors bors merged commit ba3311e into rust-lang:master Jan 21, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 28, 2021
Update cargo

7 commits in 783bc43c660bf39c1e562c8c429b32078ad3099b..c3abcfe8a75901c7c701557a728941e8fb19399e
2021-01-20 19:02:26 +0000 to 2021-01-25 16:16:43 +0000
- Minor update to tracking issue template. (rust-lang/cargo#9097)
- Add some extra help to `cargo new` and invalid package names. (rust-lang/cargo#9098)
- Fix compilation with serde 1.0.122 (rust-lang/cargo#9102)
- Add suggestion for bad package id. (rust-lang/cargo#9095)
- Remove Registry::new. (rust-lang/cargo#9093)
- Fix: set default git config search path for tests (rust-lang/cargo#9035)
- Unstable updates (rust-lang/cargo#9092)
@ehuss ehuss added this to the 1.51.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo-feature named-profiles ignored in Cargo.toml parsing
5 participants