You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CARGO_CFG_FEATURE is exposed to build scripts but that would require every library using trybuild to have a build script and then forward that to trybuild.
I've talked about the idea of bypassing the need for build scripts for reading --cfgs by having cfg_value!("...") / cfg_values!("feature") macros to pair with cfg!.
I'm not sure how crater runs work - my guess is it only runs crates with default features? If so, I suspect it wouldn't pick up this kind of breakage very often, e.g. my crate which hit this only hit this issue when tests are being run with non-default features enabled (see CI config).
Went ahead and raised #338 with a near term fix. (updated the directory logic to also handle the new build-dir layout)
Also documented this usecase in rust-lang/cargo#17287 in hopes that Cargo could eventually provide a stable way to do without many traversing the build-dir tree or relying on the fingerprint file.
Activity
epage commentedon Aug 1, 2026
CARGO_CFG_FEATUREis exposed to build scripts but that would require every library using trybuild to have a build script and then forward that totrybuild.I've talked about the idea of bypassing the need for build scripts for reading
--cfgs by havingcfg_value!("...")/cfg_values!("feature")macros to pair withcfg!.epage commentedon Aug 1, 2026
We did do a crater run but I assume that just caused things to be skipped, rather than fail.
illicitonion commentedon Aug 1, 2026
I'm not sure how crater runs work - my guess is it only runs crates with default features? If so, I suspect it wouldn't pick up this kind of breakage very often, e.g. my crate which hit this only hit this issue when tests are being run with non-default features enabled (see CI config).
ranger-ross commentedon Aug 2, 2026
Went ahead and raised #338 with a near term fix. (updated the directory logic to also handle the new build-dir layout)
Also documented this usecase in rust-lang/cargo#17287 in hopes that Cargo could eventually provide a stable way to do without many traversing the build-dir tree or relying on the fingerprint file.