-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Document default values of package.include
and package.exclude
of Cargo.toml
#9502
Comments
AFAIK there is no default value for Also, if you're in trouble with |
So by default |
I think so. At least for a package under git-control and without |
Documentation is contradictory about that: https://doc.rust-lang.org/cargo/reference/publishing.html#packaging-a-crate
That implies that both https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields
That says that only So is |
First time knows
Edit: actually it works and supports git. I typed something wrong in the past. |
I opened PR #9538 to add documentation for this, please let me know if you have any feedback.
This should be working, can you put together an example where it doesn't? Did you maybe not have any commits? Or have an cargo new foo
cd foo
git add .gitignore Cargo.toml src
git commit -m test
touch bar
cargo package --list --allow-dirty # Should contain `bar`
echo bar >> .git/info/exclude
cargo package --list --allow-dirty # Should not contain `bar` |
It works for me now. I guess I made some mistake days ago. 😞 Sorry about that and thank for your patch PR! |
Default values of
package.include
andpackage.exclude
doesn't seem to be documented anywhere, so it can be a surprise what filescargo publish
actually includes in the crate.This is especially bad since
cargo publish
is irreversible.The text was updated successfully, but these errors were encountered: