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
1.43.0-nightly (4ad624882 2020-03-03) has regressed handling of debug assertions with features.
Steps
Install 1.43.0-nightly (4ad624882 2020-03-03)
Build a crate with the following Cargo.toml
[package]
name = "test-bin"
version = "0.1.0"
edition = "2018"
[dependencies]
rocket_contrib = { version = "0.4.2", features = [ "templates", "tera_templates" ] }
Build fails with:
Compiling rocket_contrib v0.4.3
error[E0463]: can't find crate for `notify`
--> /opt/rust/registry/src/crates-io-27bb2a0041c1489d/rocket_contrib-0.4.3/src/templates/fairing.rs:35:5
|
35 | extern crate notify;
| ^^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `rocket_contrib`.
To learn more, run the command again with --verbose.
Cargo has not downloaded the required crate, so I assume a Cargo bug, instead of a rustc bug.
Build works with cargo 1.43.0-nightly (e57bd0299 2020-02-21)
In general cfg(debug_assertions) can't be used to gate inclusion of crates in dependencies, and a warning was added for that in #7660. This seems likely due to #7820 (cc @ehuss) where we reorganized where this information was calculated.
…excrichton
Partially revert change to filter debug_assertions.
This partially reverts the changes from rust-lang#7943. It caused a regression with the rocket_contrib crate. I knew that was the only crate that had a `cfg(debug_assertions)` dependency, and I saw that it had been fixed, but I did not realize the fix hadn't been published (and will be in a semver incompatible release).
This retains the old behavior for `cfg(debug_assertions)` of issuing a warning. I kept the filter for `CARGO_CFG_DEBUG_ASSERTIONS` for build scripts because that was the original intent for the change, and I don't see anyone using that.
Closesrust-lang#7966.
Problem
1.43.0-nightly (4ad624882 2020-03-03)
has regressed handling of debug assertions with features.Steps
Install
1.43.0-nightly (4ad624882 2020-03-03)
Build a crate with the following Cargo.toml
Cargo has not downloaded the required crate, so I assume a Cargo bug, instead of a rustc bug.
cargo 1.43.0-nightly (e57bd0299 2020-02-21)
Possible Solution(s)
Dependency is pulled in via a debug assertion:
https://github.com/SergioBenitez/Rocket/blob/v0.4.2/contrib/lib/Cargo.toml#L79-L80
notify
is not downloaded by Cargo during a clean build.Cargo.lock
does referencenotify
:This is a recent regression -
rust version 1.43.0-nightly (d3c79346a 2020-02-29)
also works.Suspect #7962 is at fault,.
The text was updated successfully, but these errors were encountered: