- 
                Notifications
    You must be signed in to change notification settings 
- Fork 128
[derive] Don't emit #[cfg(coverage_nightly)] #2123
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
Conversation
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
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 Additional details and impacted files@@           Coverage Diff           @@
##           v0.8.x    #2123   +/-   ##
=======================================
  Coverage   87.42%   87.42%           
=======================================
  Files          16       16           
  Lines        6115     6115           
=======================================
  Hits         5346     5346           
  Misses        769      769           ☔ View full report in Codecov by Sentry. | 
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
| Backporting to  | 
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
| AFAIK, this is the kind of cfg that is set globally on the coverage tool side, so the warning itself is not something we need to be concerned about except that it will break the build if we deny the warning. Therefore, I wonder if it would be fine to simply allow unexpected_cfg in the generated code. | 
| 
 I tend to agree that this is bad CI hygiene. However, the benefit to us of using  | 
As of nightly-2024-11-20 - specifically [1] - this triggers an
unexpected_cfgslint even when emitted in derive-generated code.[1] rust-lang/rust#132577
Fixes #2117