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

Fix filtering for workspace crates comparing canonical with non-canonical paths #94

Merged

Conversation

Tastaturtaste
Copy link
Contributor

Checklist

  • I have read the Contributor Guide
  • I have read and agree to the Code of Conduct
  • I have added a description of my changes and why I'd like them included in the section below

Description of Changes

When workspace filters (paths to workspace members' manifest) are added to the builder, the paths are automatically canonicalized. In the later checking against these filters the paths taken from the metadata are not canonical. This lead to no filter being able to match at all.

Related Issues

This fix is a prerequisite for my work on adding the --exclude-unpublished crates for cargo deny.
Please let me know if you also want me to open an issue in this repository to reference in this PR

@Tastaturtaste
Copy link
Contributor Author

Tastaturtaste commented Oct 19, 2024

For me test test prefer_index::uses_sparse_index fails locally for this branch as well as for main. Not sure what is going on here, but since it already fails on main I don't think it has anything to do with my changes.

Edit:
Tested on linux via wsl. Works there. So test fail seem to be windows specific.

@Tastaturtaste Tastaturtaste marked this pull request as ready for review October 19, 2024 11:10
Copy link
Member

@Jake-Shadle Jake-Shadle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mergify mergify bot merged commit 0925e0f into EmbarkStudios:main Nov 11, 2024
7 checks passed
mergify bot pushed a commit to EmbarkStudios/cargo-deny that referenced this pull request Nov 14, 2024
This PR adds a new command line flag `--exclude-unpublished`. If the
flag is set, the construction of the crate graph does not use explicitly
unpublished crates as roots. Workspace members are considered explicitly
unpublished if their manifest specifies `publish = false`. For
motivation please see the [associated
issue](#708).

This PR depends on EmbarkStudios/krates#94 to
fix the workspace filters mechanism of
https://github.com/EmbarkStudios/krates. Documentation for the flag will
follow as soon as I find the time.

---------

Co-authored-by: Jake Shadle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants