Skip to content
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

Composability with cargo-careful #318

Closed
robo9k opened this issue Sep 27, 2023 · 1 comment
Closed

Composability with cargo-careful #318

robo9k opened this issue Sep 27, 2023 · 1 comment
Labels
C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)

Comments

@robo9k
Copy link

robo9k commented Sep 27, 2023

I'm trying to combine cargo-llvm-cov with cargo-careful in a single "cargo test" run.

Via https://github.com/taiki-e/cargo-llvm-cov/blob/main/README.md#get-coverage-of-external-tests

$ cargo new --bin example && cd example/
$ source <(cargo +nightly llvm-cov show-env --export-prefix)
$ cargo +nightly llvm-cov clean --workspace
$ cargo +nightly careful setup
[..]
error: could not compile `core` (lib) due to 3688 previous errors; 117 warnings emitted
thread 'main' panicked at 'failed to build sysroot; run `cargo careful setup` to see what went wrong: sysroot build failed'
$ # the above fails, usually one would not run "careful setup" but the steps below
$ cargo +nightly careful test --all-targets --all-features --verbose
$ cargo +nightly llvm-cov report --codecov --output-path codecov.json

Without cargo-llvm-cov in the mix the "cargo careful test" step does work.

$ cargo +nightly --version
cargo 1.74.0-nightly (414d9e3a6 2023-09-22)

$ cargo +nightly llvm-cov --version
cargo-llvm-cov 0.5.33

$ cargo install --list | grep 'cargo-careful v'
cargo-careful v0.4.0:

I do not know if that is not possible by design of those two tools? Both docs are a bit spare on what they actually do behind the covers.
Would I just have two separate CI jobs instead?

@taiki-e taiki-e added the C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream) label Sep 27, 2023
@taiki-e
Copy link
Owner

taiki-e commented Sep 27, 2023

The problem is that -Zbuild-std is incompatible with -Cinstrument-coverage: rust-lang/rust#79401
(cargo-careful uses its own, not -Zbuild-std, but seems to have the same problem.)

Would I just have two separate CI jobs instead?

Yeah, you have to use two separate CI jobs at this time.

Closing in favor of the upstream issue.

@taiki-e taiki-e closed this as completed Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)
Projects
None yet
Development

No branches or pull requests

2 participants