-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo
should provide builtin support to let build.rs
detect feature
is supported
#12872
Comments
Cargo has no knowledge of Personally, I think auto-detecting nightly features is a mistake and instead feature flags should be used to enable them explicitly. |
Generally, I think So, personally, I agree with @epage . According to my understanding, epage suggest
anyhow = { version = "xxx", features = ["nightly"] } But, @dtolnay does not agree. So, I still insist
Which will make build system robust, with less assumption. |
Note that I did not close this because of my opinion but that cargo isn't in a place to solve this. |
Tired. Leave it for next one who fall into |
Problem
There is a
1 ~ 2 weeks project, with 1 ~ 2 weeks cache
recent
RA
v0.3.1705deep dependency tree have recent version,
thiserror-1.0.50
anyhow-1.0.75
, same authordtolnay
I encounter same old bug on
thiserror-1.0.50
anyhow-1.0.75
.#![feature]
may not be used on the stable release channel`This bug was happening one year ago, but then fix.
In conclusion, this is maybe a mix problem of
build.rs workaround to detect
feature
, such aserror_generic_member_access
, is supportedRA rustc wrapper for performance
sccache
cargo build cache
And I think the core problem is
build.rs
detectfeature
is supported, so dev invent themself.Proposed Solution
cargo
should provide builtin support to letbuild.rs
detectfeature
is supportedNotes
Related
dtolnay/thiserror#192
https://github.com/dtolnay/thiserror/blob/e9ea67c7e251764c3c2d839b6c06d9f35b154647/build.rs#L12
https://github.com/dtolnay/anyhow/blob/05e413219e97f101d8f39a90902e5c5d39f951fe/build.rs#L17
rust-lang/rust-analyzer#15057
The text was updated successfully, but these errors were encountered: