Report the unexpected_cfgs lint in external macros by Urgau · Pull Request #132577 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation27 Commits4 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Urgau

This PR marks the unexpected_cfgs lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes #132572

try-job: aarch64-gnu-debug

@rustbot

r? @wesleywiser

rustbot has assigned @wesleywiser.
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 rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Nov 3, 2024

@rust-log-analyzer

This comment has been minimized.

@rustbot

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@Urgau

@rust-log-analyzer

This comment has been minimized.

@jieyouxu

Would this need a crater run?

@Urgau Urgau mentioned this pull request

Nov 5, 2024

@Urgau

Would this need a crater run?

Evaluating the new unexpected_cfgs warnings coming from external macros on a crater run is doable (although not easy), but I'm not sure what it will give us, a part (obviously) from the number of impacted crates, which I'm not sure how to interpret. A big (or even small) number of warnings would IMO only reinforce the usefulness of enabling the reporting in external macros (not that it needs it to be clear).

Is there something particular you are looking for?

@jieyouxu

No I'm more just curious, because maybe a few crates are affected.

@Urgau

@petrochenkov

@bors

📌 Commit 37e67ac has been approved by petrochenkov

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

Nov 9, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Nov 9, 2024

@matthiaskrgr

…o, r=petrochenkov

Report the unexpected_cfgs lint in external macros

This PR marks the unexpected_cfgs lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 9, 2024

@bors

…iaskrgr

Rollup of 4 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

@workingjubilee

@bors bors added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Nov 10, 2024

@workingjubilee

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 10, 2024

@bors

… r=

Report the unexpected_cfgs lint in external macros

This PR marks the unexpected_cfgs lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572

try-job: aarch64-gnu-debug

@bors

@rust-log-analyzer

This comment has been minimized.

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Nov 19, 2024

@rust-timer

Rollup merge of rust-lang#132577 - Urgau:check-cfg-report-extern-macro, r=petrochenkov

Report the unexpected_cfgs lint in external macros

This PR marks the unexpected_cfgs lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572

try-job: aarch64-gnu-debug

@Urgau Urgau mentioned this pull request

Nov 19, 2024

smoelius added a commit to rust-fuzz/afl.rs that referenced this pull request

Nov 20, 2024

@smoelius

This recent change is causing CI to fail: rust-lang/rust#132577

The failure is caused by the used_linker feature in code produced by the ctor::ctor attribute macro.

This was referenced

Nov 20, 2024

github-merge-queue bot pushed a commit to rust-fuzz/afl.rs that referenced this pull request

Nov 20, 2024

@smoelius

This recent change is causing CI to fail: rust-lang/rust#132577

The failure is caused by the used_linker feature in code produced by the ctor::ctor attribute macro.

tnull added a commit to tnull/rust-lightning that referenced this pull request

Nov 26, 2024

@tnull

Rustc 1.84 (nightly) introduced that the unexpected_cfgs lint will now be reported for external macros (see rust-lang/rust#132577), leading to some of our builds failing due to our level = "forbid" config of unexpected cfg flags.

Here, we add the logging features to the expected features of the workspace to mitigiate this issue and fix builds.

@tnull tnull mentioned this pull request

Nov 26, 2024

This was referenced

Nov 29, 2024

@sirno sirno mentioned this pull request

Dec 2, 2024

joshlf added a commit to google/zerocopy that referenced this pull request

Dec 3, 2024

@joshlf

As of nightly-2024-11-20 - specifically [1] - this triggers an unexpected_cfgs lint even when emitted in derive-generated code.

[1] rust-lang/rust#132577

Fixes #2117

gherrit-pr-id: I9d536f0ea08475afe0b65411b225aa55f4db449a

github-merge-queue bot pushed a commit to google/zerocopy that referenced this pull request

Dec 3, 2024

@joshlf

As of nightly-2024-11-20 - specifically [1] - this triggers an unexpected_cfgs lint even when emitted in derive-generated code.

[1] rust-lang/rust#132577

Fixes #2117

gherrit-pr-id: I9d536f0ea08475afe0b65411b225aa55f4db449a

joshlf added a commit to google/zerocopy that referenced this pull request

Dec 3, 2024

@joshlf

As of nightly-2024-11-20 - specifically [1] - this triggers an unexpected_cfgs lint even when emitted in derive-generated code.

[1] rust-lang/rust#132577

Fixes #2117

gherrit-pr-id: I9d536f0ea08475afe0b65411b225aa55f4db449a

github-merge-queue bot pushed a commit to google/zerocopy that referenced this pull request

Dec 3, 2024

@joshlf

As of nightly-2024-11-20 - specifically [1] - this triggers an unexpected_cfgs lint even when emitted in derive-generated code.

[1] rust-lang/rust#132577

Fixes #2117

gherrit-pr-id: I9d536f0ea08475afe0b65411b225aa55f4db449a

richvdh added a commit to matrix-org/matrix-rust-sdk-crypto-wasm that referenced this pull request

Dec 10, 2024

@richvdh

Since rust-lang/rust#132577 (currently in rust nightly), we get hundreds of lint warnings:

warning: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
  --> src/rust/lib.rs:83:1
   |
83 | #[wasm_bindgen(start)]

The correct solution is to upgrade wasm-bindgen, but legend has it that is difficult. For now, let's silence the lint.

richvdh added a commit to matrix-org/matrix-rust-sdk-crypto-wasm that referenced this pull request

Dec 11, 2024

@richvdh

Since rust-lang/rust#132577 (currently in rust nightly), we get hundreds of lint warnings:

warning: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
  --> src/rust/lib.rs:83:1
   |
83 | #[wasm_bindgen(start)]

The correct solution is to upgrade wasm-bindgen, but legend has it that is difficult. For now, let's silence the lint.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Dec 14, 2024

@matthiaskrgr

…ouxu

Add external macros specific diagnostics for check-cfg

This PR adds specific check-cfg diagnostics for unexpected cfg in external macros.

As well as hiding the some of the Cargo specific help/suggestions as they distraction for external macros and are generally not the right solution.

Follow-up to rust-lang#132577

@rustbot label +L-unexpected_cfgs r? compiler

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Dec 14, 2024

@rust-timer

Rollup merge of rust-lang#133221 - Urgau:check-cfg-macro-diag, r=jieyouxu

Add external macros specific diagnostics for check-cfg

This PR adds specific check-cfg diagnostics for unexpected cfg in external macros.

As well as hiding the some of the Cargo specific help/suggestions as they distraction for external macros and are generally not the right solution.

Follow-up to rust-lang#132577

@rustbot label +L-unexpected_cfgs r? compiler

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Jan 22, 2025

@tmeijn

This MR contains the following updates:

Package Update Change
rust minor 1.83.0 -> 1.84.0

MR created with the help of el-capitano/tools/renovate-bot.

Proposed changes to behavior should be submitted there as MRs.


Release Notes

rust-lang/rust (rust)

v1.84.0

Compare Source

==========================

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts

Cargo

Rustdoc

Compatibility Notes


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.



This MR has been generated by Renovate Bot.

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request

Feb 2, 2025

@he32

Pkgsrc changes:

Upstream changes:

Version 1.84.1 (2025-01-30)

Version 1.84.0 (2025-01-09)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts

Cargo

Rustdoc

Compatibility Notes

Labels

L-unexpected_cfgs

Lint: unexpected_cfgs

relnotes

Marks issues that should be documented in the release notes of the next release.

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.