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

Path dependencies that included in the workspace are displayed in the report, even if --all flag is not used #31

Closed
taiki-e opened this issue Jun 14, 2021 · 3 comments · Fixed by #33
Labels
C-bug Category: related to a bug.

Comments

@taiki-e
Copy link
Owner

taiki-e commented Jun 14, 2021

This behavior is correct for virtual workspaces, but otherwise it doesn't match the behavior of cargo.

See:

@taiki-e taiki-e added the C-bug Category: related to a bug. label Jun 14, 2021
@jhpratt
Copy link

jhpratt commented Jun 15, 2021

For what it's worth, I find it quite nice to have the workspace included. Admittedly this likely wouldn't be the case for non-workspace dependencies.

@taiki-e
Copy link
Owner Author

taiki-e commented Jun 15, 2021

The problem is that even if --all/--workspace flag is not being used, other crates will be displayed in the report.

If you want to get the coverage of other crates in the workspace (and the workspace is not virtual), you have to use the --all or --workspace flag (like cargo test). Otherwise, the tests will not be run on those crates, so the reported coverage will be lower than it actually is.

@jhpratt
Copy link

jhpratt commented Jun 15, 2021

Ah, gotcha. The crate I was happy to see it for was a proc macro, which doesn't have tests of its own. Either way I don't mind typing a couple more characters.

@bors bors bot closed this as completed in f90a55e Jun 15, 2021
bors bot added a commit that referenced this issue Feb 6, 2022
131: Add --exclude-from-test/--exclude-from-report r=taiki-e a=taiki-e

- Add `--exclude-from-test` option to exclude specific packages from the test but not from the report.
- Add `--exclude-from-report` option to exclude specific packages from the report but not from the test.
- Workspace members are now always included in the report unless specified by `--exclude` or `--exclude-from-report`.

Closes #103
Effectively reverts #31

Co-authored-by: Taiki Endo <te316e89@gmail.com>
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants