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

doc(features): Highlight the non-blocking feature gating technique #13307

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

epage
Copy link
Contributor

@epage epage commented Jan 16, 2024

We already discussed non-blocking gates but the language makes it sound like it was limited to config.toml.
Since I haven't been touching that, I had always overlooked that section.

This change brings the blocking / non-blocking decision front and center.
To support this, the later sections focus more on mechanisms (the gate) rather than on what is being done (new syntax for cargo-features).

I also feel this makes the content more scannable.

This is adapted from what I did for [lints] (see #12148).

We already discussed non-blocking gates but the language makes it sound
like it was limited to `config.toml`.
Since I haven't been touching that, I had always overlooked that
section.

This change brings the blocking / non-blocking decision front and
center.
To support this, the later sections focus more on mechanisms (the gate)
rather than on what is being done (new syntax for `cargo-features`).

I also feel this makes the content more scannable.

This is adapted from what I did for `[lints]` (see rust-lang#12148).
@rustbot
Copy link
Collaborator

rustbot commented Jan 16, 2024

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-unstable Area: nightly unstable support S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 16, 2024
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Looks good. Feel free to address nits or r=me.

BTW, by “non-blocking feature gate” does it refer to a feature gate that won't bail out but warn/ignore?

src/cargo/core/features.rs Outdated Show resolved Hide resolved
@epage
Copy link
Contributor Author

epage commented Jan 16, 2024

Looks good. Feel free to address nits or r=me.

BTW, by “non-blocking feature gate” does it refer to a feature gate that won't bail out but warn/ignore?

Yes. Didn't end up using that term in the PR.

@epage
Copy link
Contributor Author

epage commented Jan 16, 2024

nits addressed

@bors r=weihanglo

@bors
Copy link
Collaborator

bors commented Jan 16, 2024

📌 Commit 354e198 has been approved by weihanglo

It is now in the queue for this repository.

@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 16, 2024
@bors
Copy link
Collaborator

bors commented Jan 16, 2024

⌛ Testing commit 354e198 with merge a383063...

@bors
Copy link
Collaborator

bors commented Jan 16, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing a383063 to master...

@bors bors merged commit a383063 into rust-lang:master Jan 16, 2024
20 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 18, 2024
Update cargo

2 commits in 1cff2ee6b92e0ad3f87c44b70b28f788b2528b3c..1ae631085f01c1a72d05df1ec81f3759a8360042
2024-01-16 16:56:57 +0000 to 2024-01-17 17:26:41 +0000
- fix(json-msg): use pkgid spec in in JSON messages (rust-lang/cargo#13311)
- doc(features): Highlight the non-blocking feature gating technique (rust-lang/cargo#13307)

r? oli-obk

Could you check if this fixes miri build?
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 18, 2024
Update cargo

2 commits in 1cff2ee6b92e0ad3f87c44b70b28f788b2528b3c..1ae631085f01c1a72d05df1ec81f3759a8360042
2024-01-16 16:56:57 +0000 to 2024-01-17 17:26:41 +0000
- fix(json-msg): use pkgid spec in in JSON messages (rust-lang/cargo#13311)
- doc(features): Highlight the non-blocking feature gating technique (rust-lang/cargo#13307)

r? oli-obk

Could you check if this fixes miri build?
@rustbot rustbot added this to the 1.77.0 milestone Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-unstable Area: nightly unstable support 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.

4 participants