-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Crater run for --check-cfg
/-Zcheck-cfg
#120701
Comments
Is your goal here getting a feel for how many people will need to add their special cfgs to their list? |
🚨 Error: failed to parse the command 🆘 If you have any trouble with Crater please ping |
@Nilstrieb Yes, and also to check and see if we have not missed a well known cfg. As for the craterbot command, it should be Footnotes |
@craterbot run name=check-cfg mode=check-only start=nightly-2024-02-05 end=nightly-2024-02-05+cargoflags=-Zcheck-cfg+rustflags=-Dunexpected_cfgs |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
@Nilstrieb can we quickly retry the regressed crates, to remove any OOM, spurious, ...
|
@craterbot run name=check-cfg-2 mode=check-only start=nightly-2024-02-05 end=nightly-2024-02-05+cargoflags=-Zcheck-cfg+rustflags=-Dunexpected_cfgs crates=https://crater-reports.s3.amazonaws.com/check-cfg/retry-regressed-list.txt p=1 |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
Crater report analysisContext: The crater run enable-by-default cargo Affected projects: 6708 / 414692 (1.62%) 50 most seen unexpected cfg errorsSummary: no false-positives1, see the others section for more details. well, ignoring
50 most seen unexpected
|
name | value | comment |
---|---|---|
feature |
"cargo-clippy" |
8038 errors in 531 projects |
feature |
"dim3" |
6714 errors in 14 projects |
feature |
"serde" |
4006 errors in 88 projects |
feature |
"dim2" |
3796 errors in 13 projects |
feature |
"tracing" |
2035 errors in 10 projects |
feature |
"std" |
1948 errors in 138 projects |
feature |
"library" |
1910 errors in 72 projects |
feature |
"inline" |
1786 errors in 2 projects |
feature |
"inline_always" |
1781 errors in 2 projects |
feature |
"dox" |
1701 errors in 5 projects |
feature |
"clippy" |
1444 errors in 92 projects |
feature |
"inline-more" |
1244 errors in 6 projects |
feature |
"last_seen_epoch" |
1008 errors in 252 projects |
feature |
"last_seen_iso_8601" |
1008 errors in 252 projects |
feature |
"sqlx" |
982 errors in 4 projects |
feature |
"arbitrary_precision" |
924 errors in 4 projects |
feature |
"unstable" |
786 errors in 32 projects |
feature |
"nightly" |
752 errors in 92 projects |
feature |
"conversion" |
736 errors in 2 projects |
feature |
"simd" |
654 errors in 9 projects |
feature |
"dist_mode" |
584 errors in 4 projects |
feature |
"cons_mode" |
460 errors in 3 projects |
feature |
"json" |
426 errors in 73 projects |
feature |
"grpc" |
392 errors in 4 projects |
feature |
"dashu-int-TODO" |
390 errors in 1 projects |
feature |
"1.10.0" |
372 errors in 2 projects |
feature |
"1.12.0" |
370 errors in 2 projects |
feature |
"nalgebra" |
368 errors in 2 projects |
feature |
"test" |
352 errors in 21 projects |
feature |
"ffmpeg_5_0" |
332 errors in 1 projects |
feature |
"enable-tracing" |
328 errors in 1 projects |
feature |
"ffmpeg_4_3" |
321 errors in 1 projects |
feature |
"raw_value" |
312 errors in 2 projects |
feature |
"debug" |
294 errors in 11 projects |
feature |
"cgmath" |
240 errors in 2 projects |
feature |
"metrics" |
220 errors in 6 projects |
feature |
"mdns" |
208 errors in 2 projects |
feature |
"branch_mode" |
200 errors in 3 projects |
feature |
"branch_wasm_mode" |
192 errors in 3 projects |
feature |
"ffmpeg_4_2" |
192 errors in 1 projects |
feature |
"ffmpeg_4_4" |
192 errors in 1 projects |
feature |
"dev" |
184 errors in 15 projects |
feature |
"wee_alloc" |
176 errors in 47 projects |
feature |
"serde-feature" |
172 errors in 5 projects |
feature |
"ffmpeg_4_1" |
172 errors in 1 projects |
feature |
"critical-section" |
170 errors in 43 projects |
feature |
"serialize" |
170 errors in 9 projects |
feature |
"failpoints" |
164 errors in 3 projects |
feature |
"persistence" |
164 errors in 15 projects |
feature |
"jack" |
154 errors in 12 projects |
50 most seen unexpected target_*
cfg
Summary: Many typos (target_os="unix"
, target_arch="i686"
, ...), some reference to removed targets (target_os="cloudabi"
, target_arch="asmjs"
, ...), as well as some custom cfg (target_os="solana"
, ...).
name | value | comment |
---|---|---|
target_os |
"solana" |
3520 errors in 23 projects |
target_arch |
"spirv" |
952 errors in 11 projects |
target_pointer_width |
"128" |
690 errors in 43 projects |
target_arch |
"nvptx" |
630 errors in 10 projects |
target_pointer_width |
"8" |
427 errors in 38 projects |
target_os |
"bitrig" |
384 errors in 58 projects |
target_os |
"dos" |
368 errors in 7 projects |
target_os |
"unix" |
166 errors in 22 projects |
target_arch |
"i686" |
140 errors in 14 projects |
target_arch |
"mips64el" |
114 errors in 4 projects |
target_os |
"nacl" |
86 errors in 14 projects |
target_env |
"wasi" |
84 errors in 8 projects |
target_arch |
"asmjs" |
82 errors in 14 projects |
target_os |
"darwin" |
48 errors in 13 projects |
target_feature |
"1_30" |
48 errors in 1 projects |
target_feature |
"session" |
44 errors in 1 projects |
target_arch |
"wasm" |
44 errors in 5 projects |
target_os |
"wasm" |
44 errors in 4 projects |
target_os |
"dragonflybsd" |
40 errors in 7 projects |
target_arch |
"riscv" |
34 errors in 7 projects |
target_arch |
"armv7" |
34 errors in 9 projects |
target_arch |
"mipsel" |
34 errors in 9 projects |
target_arch |
"s390" |
30 errors in 1 projects |
target_arch |
"aarch" |
28 errors in 5 projects |
target_os |
"androideabi" |
28 errors in 1 projects |
target_os |
"cloudabi" |
26 errors in 5 projects |
target_env |
"kernel" |
26 errors in 2 projects |
target_arch |
"alpha" |
24 errors in 2 projects |
target_arch |
"parisc" |
24 errors in 2 projects |
target_arch |
"arm64" |
24 errors in 2 projects |
target_feature |
"iter_advance_by" |
24 errors in 3 projects |
target_feature |
"crypto" |
20 errors in 3 projects |
target_os |
"cbe" |
20 errors in 1 projects |
target_arch |
"x64_64" |
20 errors in 3 projects |
target_os |
"switch" |
18 errors in 3 projects |
target_os |
"window" |
18 errors in 5 projects |
target_arch |
"parisc2.0" |
16 errors in 1 projects |
target_arch_char_unsigned |
None |
16 errors in 1 projects |
target_arch |
"i386" |
16 errors in 3 projects |
target_device |
"esp8266" |
16 errors in 1 projects |
target_is |
"macos" |
16 errors in 2 projects |
target_feature |
"exact_size_is_empty" |
16 errors in 3 projects |
target_arch |
"x64" |
16 errors in 2 projects |
target_os |
"solarish" |
16 errors in 1 projects |
target_arch |
"amd64" |
16 errors in 1 projects |
target_arch |
"mos" |
16 errors in 1 projects |
target_feature |
"play-single-file" |
16 errors in 1 projects |
target_feature |
"f64" |
16 errors in 1 projects |
target_os |
"wasm32" |
14 errors in 3 projects |
target_arch |
"xtensa" |
14 errors in 3 projects |
Summary
There are four big outliers: docsrs
(already fixed)2, rustfmt
(deprecated/no longer in use) as well as feature="cargo-clippy"
(and feature="clippy"
) both of which are de-facto deprecated and no longer used. There is nothing do to for those.
Therefore (excluding the outliers) there are 188089 unexpected cfgs errors, of which 69897 of the are unexpected feature
cfgs and 11125 errors are of target_*
.
After manually checking the 3 categories above I wasn't able to find any false positive1; in total 9649 actions would need to be taken across 5959 projects (1.4% of all the projects tested), by either: fixing the typo, removing the staled condition, marking as expected the custom cfg, adding the feature to the features
table...
All and all, while the impact is certainly not minimal, I think it is heavily mitigated by the fact that it's warn-by-default, only affects maintainers (never the downstream users) and by it's ability to warn users on unexpected cfgs, a deficiency of the Rust toolchain, reported many times, that will final be fixed.
Footnotes
Btw this report was analysed by this custom python script. @rustbot label -S-waiting-on-review |
I was not aware that we had ruled out |
Crater run for
--check-cfg
(and Cargo-Zcheck-cfg
).Command to be used:
@craterbot run name=check-cfg mode=check start=nightly-2024-02-05 end=nightly-2024-02-05+cargoflags=-Zcheck-cfg+rustflags=-Dunexpected_cfgs
@rustbot label +F-check-cfg -needs-triage
The text was updated successfully, but these errors were encountered: