-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add include
and exclude
information to metadata
#13331
Comments
FYI the title and problem are still focused on one specific solution, rather than the problem at hand. Going to copy oer from #13330 @weihanglo's comment which has some good context when considering solutions:
For the most part, Besides those limitations in We could have |
I was pretty sure that I was missing on the overall complexity on cargo side hence why I implemented it with just the fields values and why I was planning to retrieve the information from |
### What does this PR try to resolve? This adds a special case for checking source files are symlinks and have been modified when under a VCS control This is required because those paths may link to a file outside the current package root, but still under the git workdir, affecting the final packaged `.crate` file. ### How should we test and review this PR? Pretty similar to #14966, as a part of #14967. This may have potential performance issue. If a package contains thousands of symlinks, Cargo will fire `git status` for each of them. Not sure if we want to do anything proactively now. The introduction of the `PathEntry` struct gives us more room for storing file metadata to satisfiy use cases in the future. For instances, * Knowing a source file is a symlink and resolving it when packaging on Windows * #5664 * #14965 * Knowing more about a file's metadata (e.g. permission bits from Git) * #4413 * #8006 * Provide richer information for `cargo package --list`, for example JSON output mode * #11666 * #13331 * #13953
Problem
I'm currently working on rust-lang/rust-clippy#11677. However, to finish this lint, I need to have the
include
andexclude
information in the metadata (to be used withcargo_metadata
).Proposed Solution
I think that to prevent having to recompute
include
andexclude
when using it frommetadata
and duplicate what cargo does, it should contain the equivalent ofcargo package --list
. An initial implementation was done inNotes
No response
The text was updated successfully, but these errors were encountered: