cargo package
in workspaces doesn't put artifacts in root target
dir
#4304
Labels
cargo package
in workspaces doesn't put artifacts in root target
dir
#4304
(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: