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

Add include and exclude information to metadata #13330

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GuillaumeGomez
Copy link
Member

I'll need this information to fix rust-lang/rust-clippy#11677. I'll also send a PR to cargo_metadata once merged.

Of course, if there is another way to retrieve this information without needing this PR, I'd love to hear it. :)

@rustbot
Copy link
Collaborator

rustbot commented Jan 20, 2024

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2024
@@ -106,6 +106,8 @@ pub struct SerializedPackage {
metabuild: Option<Vec<String>>,
default_run: Option<String>,
rust_version: Option<RustVersion>,
include: Vec<String>,
Copy link
Member

Choose a reason for hiding this comment

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

While it might be useful to have include and exclude in cargo metadata output, it doesn't seem to be a proper way to fix rust-lang/rust-clippy#11677. The solution might end up reimplement the logic Cargo find and package files, which includes .gitignore, shell glob syntax, symlinks handling, git dirty status, and other details (see #11405). cargo package --list might be more reliable, but not 100% accurate (see #8407 and #11666).

I would suggest starting the discussion from an issue, and jump back to implementation when the design is settled.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that's a good point. I'll open an issue so it can be discussed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I opened #13331.

@weihanglo weihanglo added S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 27, 2024
@weihanglo weihanglo marked this pull request as draft January 27, 2024 20:17
@weihanglo weihanglo removed the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Jan 27, 2024
@bors
Copy link
Collaborator

bors commented Apr 4, 2024

☔ The latest upstream changes (presumably #13703) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

include_str or include_bytes not in Cargo.toml/include
5 participants