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

Exclude tag does not work properly on packages with both main.rs and lib.rs #339

Open
GunnarMorrigan opened this issue Jan 17, 2024 · 2 comments
Labels
C-bug Category: related to a bug. O-windows Operating system: Windows S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.

Comments

@GunnarMorrigan
Copy link

GunnarMorrigan commented Jan 17, 2024

Performing cargo llvm-cov test on a workspace with excluded packages does not properly exclude packages with both main.rs and lib.rs.

The command:
The html output of cargo llvm-cov test --workspace --exclude example_a --html will include example_a regardless.
Here example_a is a package containing both a main.rs and a lib.rs.

If I rename lib.rs in example_a I get the following error:

error: C:\...\example_a\src\lib.rs: no such file or directory
warning: The file 'C:\...\example_a\src\lib.rs' isn't covered.

This indicates that the exclude is not properly applied or I am using it wrong.

@taiki-e
Copy link
Owner

taiki-e commented Jan 18, 2024

Thanks for the report! It looks like there is some kind of problem with the path handling in Windows.

Could you provide an example that can reproduce the problem?

@taiki-e taiki-e added C-bug Category: related to a bug. O-windows Operating system: Windows needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example labels Jan 18, 2024
@GunnarMorrigan
Copy link
Author

Hi,

Thank you for creating such a cool tool!

I haven't been able to recreate the problem minimally. I will keep trying tho!
Additionally, I have checked all package names and folders if they match up with the exclude tag but haven't found a problem so far. I might try fork llvm and print some debug info and see where it goes wrong.

Hope i have the time for this on the short term

@taiki-e taiki-e added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: related to a bug. O-windows Operating system: Windows S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.
Projects
None yet
Development

No branches or pull requests

2 participants