chore: ignore Cargo.toml files under target/ when scanning for eligible crates in check-features #492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When running
make check-features
locally, it will pick up crates undertarget/
based on how thefind
command is constructed. This shows up as a single error message early on in the command because one of our crates --saluki-metrics
-- uses a specific crate for testing (trybuild
) that outputs a temporary crate undertarget/tests/
used for testing macros.This crate is then found when running
make check-features
, and spits out an error, because when we try to then executecargo hack check
on it, Cargo doesn't know about it: it's not part of the workspace. The error looks like this:This PR simply excludes
target/
entirely fromfind
in the first place.Change Type
How did you test this PR?
main
and rancargo clean
to remove the existing artifacts undertarget/
.make check-features
and observed that no error shows up: we haven't ran the test that generates the spurious crate yet.make test-all
to prime thetarget/
directory with the spurious crate.make check-features
again and observe, early on, the following error:error: package ID specification
saluki-metrics-testsmatched no packages
main
.I did this both on Linux and macOS just to make sure we weren't using any specific flags of
find
that have differences between the GNU and BSD variants.References
N/A