-
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
cargo package
in workspaces doesn't put artifacts in root target
dir
#4304
Comments
Okay, found the tracker for Also, should mention this part from the RFC:
And, one clarification: even a command like this: cargo package --manifest-path <path-to-member>/Cargo.toml results in a I'm guessing that this is a separate issue from supporting |
Ah yeah the placement of |
cargo package
in workspaces doesn't put artifacts in root target
dir
We'd previously dump it in the package's directory which is wrong when working in a workspace. Closes rust-lang#4304
Untar into the right dir when verifying We'd previously dump it in the package's directory which is wrong when working in a workspace. Closes #4304 r? @alexcrichton
(Since
package
is part of thepublish
command, most of the following concerns also apply topublish
.)The current "Publishing on crates.io" doc doesn't have any content regarding workspaces: http://doc.crates.io/crates-io.html
Here's what the workspace RFC (and The Manifest Format) say about build outputs:
Now, if you
cd
to the directory of a member crate and executecargo package
, the package tarball is created in atarget
directory next to the memberCargo.toml
, but not the root. It's not clear ifpackage
falls under this rule, or not, as it's not exactly compiling.So, is this expected behavior for
cargo package
? If so, should we add a note about it to the docs?Also worth noting is the fact that, when packaging, all the dependent package versions are expected to be available on crates.io. I think that's expected behavior, but it results in different behavior between
build
/test
andpackage
, where first ones pass easily if a dependency is not registered, but the latter fails withno matching package named [...] found
. Do we need to have a note about this, also?And, of course, there's the larger issue of
package
not supporting--all
, which I assume is a KP, but haven't been able to find a tracker for it. I think if we intentionally want to not support--all
forpackage
(andpublish
), we better document it in the CLI and the docs.The text was updated successfully, but these errors were encountered: