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
The current way does not handle it correctly when the version is specified in a cargo or rustup specific way (e.g., cargo +nightly-..., rustup run +nightly-...).
let path = env.rustc.as_deref().unwrap_or_else(|| OsStr::new("rustc"));
let version = cmd!(path,"--version").dir(workspace_root).read()?;
let nightly = version.contains("-nightly") || version.contains("-dev");
letmut cmd = if nightly {cmd!(path)}else{cmd!("rustup","run","nightly","rustc")};
cmd.args(&["--version","--verbose"]);
let verbose_version = cmd.read()?;
Currently, the following heuristic is the only one that uses the retrieved rustc information, so it does not affect the coverage results, but it may accidentally remove dependency's build artifacts.
If we need the major-minor-patch version of the toolchain (e.g., cargo-hack's --version-range), cargo --version --verbose is fine, but if we need the exact toolchain date of nightly rustc, cargo --version --verbose is not enough.
So I think the correct action here is just to remove this heuristic. (IICU, the way introduced in #79 should work well without rustc version-based heuristics.)
So I think the correct action here is just to remove this heuristic. (IICU, the way introduced in #79 should work well without rustc version-based heuristics.)
In fact, it relies on information from rustc here as well, but that can be avoided.
The current way does not handle it correctly when the version is specified in a cargo or rustup specific way (e.g.,
cargo +nightly-...
,rustup run +nightly-...
).cargo-llvm-cov/src/rustc.rs
Lines 16 to 22 in eb7c3f3
Currently, the following heuristic is the only one that uses the retrieved rustc information, so it does not affect the coverage results, but it may accidentally remove dependency's build artifacts.
cargo-llvm-cov/src/main.rs
Line 100 in eb7c3f3
related(?): rust-lang/cargo#2833
The text was updated successfully, but these errors were encountered: