-
Notifications
You must be signed in to change notification settings - Fork 90
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
cargoLlvmCov produces different result in Nix derivation than a regular invocation #283
Comments
I'm not entirely sure why that happens, maybe it's the default cc @figsoda in case you have more context around this? |
I'm not sure what could be causing this, could it have something to do with |
FWIW. In our CI we're doing:
and it works fine, AFAICT, a 60% coverage. |
With and also without Nix? |
We never run it locally, AFAICT. So with, in our CI. But by calling |
When I execute
cargo llvm-cov
directly, results seem to be fine. When I execute it in a Nix derivation usingcrane.cargoLlvmCov
, it seems like it takes all dependencies into account as well. However, this is not something that you want. The difference is significant:Without Nix:
lines......: 65.5% (16880 of 25762 lines)
Within Nix:
lines......: 22.4% (38873 of 173539 lines)
I suppose that in the regular workflow,
llvm-cov
filters out all dependencies (by some regex into thetarget
folder), while in the Nix derivation thetarget
folder is not within the same location as thesrc
folder, hence, some regex probably doesn't match anymore.I tried to workaround this with the
--ignore-filenames-regex
parameter ofcargo-llvm-cov
, but without success. I can't find the location where the build artifacts are stored. It is neither in$CARGO_TARGET_DIR
nor in$CARGO_BUILD_TARGET_DIR
The text was updated successfully, but these errors were encountered: