Skip to content

Commit 545ef52

Browse files
committed
Add counter balance to build probe drawback
1 parent 55a7632 commit 545ef52

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

text/3857-cfg-version.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,16 @@ While that isn't always true today (e.g. some Cargo features go from "unknown" w
283283
having distinct implementations for different Rust versions can make the testing matrix more complex.
284284
Tools like [`cargo hack`](https://crates.io/crates/cargo-hack) can help which can run commands on not just one toolchain version but also the every version starting with the MSRV with a command like `cargo hack --rust-version --version-step 1 check`.
285285

286-
This does not help with probes for specific implementations of nightly features which still requires having a `build.rs`.
286+
This does not help with identifying nightlies that a feature is available on or compatible with which will still require a `build.rs`.
287+
In terms of doing this via build probes,
288+
Cargo team has previously rejected support for build probes
289+
([source](https://github.com/rust-lang/cargo/issues/11244#issuecomment-2326780810)).
290+
Whether build probes or nightly version checks,
291+
auto-enabling nightly features
292+
(rather than having users opt-in)
293+
runs counter to the spirit of nightly (works like stable except where you opt-in)
294+
and cause problems if the checks are incorrect which has broken many crates nightly builds in the past
295+
and has even caused friction in changing unstable features within the compiler.
287296

288297
Libraries could having ticking time bombs that accidentally break or have undesired behavior for some future Rust version that can't be found until we hit that version.
289298

0 commit comments

Comments
 (0)