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

Support adding paths to include key #6031

Closed
mathstuf opened this issue Sep 15, 2018 · 8 comments
Closed

Support adding paths to include key #6031

mathstuf opened this issue Sep 15, 2018 · 8 comments
Labels
A-build-scripts Area: build.rs scripts A-manifest Area: Cargo.toml issues S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@mathstuf
Copy link
Contributor

Currently, include is a complete list. It would be nice to have a way to just specify additional includes rather than having to list all paths when I just want one extra file to trigger a rebuild (namely a custom derive reading files).

@mathstuf
Copy link
Contributor Author

Hmm. For some reason, when setting include myself to a list of paths, it still isn't triggering a rebuild when changing a listed input file.

@lights0123
Copy link

That's not what include does—it's just an opposite of exclude. There's this feature in build scripts, but that doesn't necessarily trigger a rebuild of the whole crate.

@epage
Copy link
Contributor

epage commented Oct 24, 2023

@mathstuf Could you give a reproduction case? It sounds like you are talking about package.include which is just about what files to include when running cargo package or cargo publish and doesn't have anything to do with rebuilding.

@epage epage added the S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. label Oct 24, 2023
@mathstuf
Copy link
Contributor Author

@epage
Copy link
Contributor

epage commented Oct 24, 2023

because using include or rerun-if-changed=

What do you mean by include?

@epage epage added the A-build-scripts Area: build.rs scripts label Oct 24, 2023
@epage
Copy link
Contributor

epage commented Oct 24, 2023

btw #4587 is the issue for dealing with built-in heuristics.

@mathstuf
Copy link
Contributor Author

What do you mean by include?

Apparently package.include, per a link from the URLO thread I linked: https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields

@weihanglo
Copy link
Member

weihanglo commented Oct 24, 2023

From my understanding, this is essentially a duplicate of #4587, as they all talk about keeping the default file change detection when adding a new rerun-if-changed instruction. The main difference is this one has brought the other solution — make package.include additive. While this could fix the original issue, it complicates the meaning of package.include. It mainly serves for cargo package and has a side effect on default rebuild detection coincidentally.

I think we should merge this into #4587 so we won't lose any bit of different possible solutions. Closing and thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-scripts Area: build.rs scripts A-manifest Area: Cargo.toml issues S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

5 participants