-
Notifications
You must be signed in to change notification settings - Fork 2.6k
cargo package
(and publish) includes target
folder
#15398
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
Comments
Thanks for the report! This is normal behavior. The |
I see, thank you for information. I request to document packaging behaviour explicitly by outlining whole process, rather than imply that user will eventually find and read RFC (if it exists) |
Also I'd like to not build it once more time, as on CI it's a common and recommended practice to build package and run tests before run the package, but it's important to verify that all required metadata is present |
The packaging behavior is documented at https://doc.rust-lang.org/cargo/commands/cargo-package.html with an outline of all the steps. Is there something there that seems to be missing? I'm not sure I understand your second comment. If you don't want to build it when packaging or publishing, there is a |
The default behaviour (build to verify) is not documented. In the second statement I'd like to have an option to verify by CI rules (not written in Cargo.toml I understand the default rules, but I'd like to modify them |
It is documented as I see it:
Mind sharing your suggestion what is missing?
Sorry I don't quite understand. Could you expand a bit what the option you're looking for "verifying by CI rules"? With |
@weihanglo thank you for a response. I concentrated on first two phases, so missed this part in documentation. Nevertheless, I still see Verification process consists in 2 phases: metadata verification (warning only) and build. I'd like to turn off Could you please suggest an approach to achieve this goal? |
The
That sounds pretty much related to #12235, which user could have controls over warnings emitted by Cargo. Let me link this from there. Anything beyond above we can help with? |
I'd like to verify my cargo workspace before packaging but without building. At the moment On the other hand I don't (and won't) trust build process and code enough to allow access to any secrets in any environment. |
Thanks for the info, @eirnym.
Do you want to submit a new issue for tracking this, and close this one? It is also fine if you want to update the title and the description of this issue. |
These two are are separate issues, I'll create new issues |
Problem
Per documentation,
target
folder is excluded from package.let's test it:
dev
)First point is concerning, because I don't trust any build process enough to share secrets with it. Even if on CI you cannot call remote, secrets might be embedded into package.
Second point is clear discrepancy with documentation, which states, that
target
folder is ALWAYS excluded.Explicit
exclude
fortarget
folder doesn't workSteps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: