Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upcargo publish --all #1169
Comments
alexcrichton
added
the
Command-publish
label
Jan 14, 2015
alexcrichton
referenced this issue
Jan 14, 2015
Closed
`cargo package` doesn't work with child packages #849
This comment has been minimized.
This comment has been minimized.
|
This would be awesome ;) |
alexcrichton
referenced this issue
Apr 30, 2015
Closed
Add support for path dependencies in crates.io uploads #1565
This comment has been minimized.
This comment has been minimized.
|
I suspect we may want to have a story with #883 if/when we implement this: I could easily imagine unintentionally publishing crates by not realising that I'm depending on them. |
This comment has been minimized.
This comment has been minimized.
botev
commented
Jul 30, 2015
|
Is there any progress on this? I think this would a very good thing to have. One of the nice things about crates is that they are modular, thus reduce the compile time of larger projects. However, if you are developing a large library compile times can get pretty slow (when it hits >2min I start to compile after 50% of the fixing, so it can compile while I'm fixing the other 50% of the issues). In this case you can split the library into sub-crates, where each sub-crate is in some sense standalone, or a build-up over "core" structure. However, each one of them would not make any sense on its own. Publishing each individually does not make any sense also and not packaging it together. If we can have this kind of publish --all this would give as an option to reduce compile times without any drawback from the user and publishing side of the library. |
carols10cents
added
the
A-workspaces
label
May 10, 2017
carols10cents
referenced this issue
Sep 25, 2017
Closed
Provide a way to run cargo subcommands on all crates in the workspace #2878
This comment has been minimized.
This comment has been minimized.
matthiasbeyer
commented
Feb 3, 2018
|
Any updates whether this will be implemented and when? |
This comment has been minimized.
This comment has been minimized.
|
@matthiasbeyer I think this fell through the cracks when we did workspaces. This issue was supposed to track wrapping @alexcrichton what's the status? |
This comment has been minimized.
This comment has been minimized.
|
@wycats AFAIK this has always been in the 'nice to have' category and hasn't progressed to the 'someone has put time into designing this' category. |
This comment has been minimized.
This comment has been minimized.
matthiasbeyer
commented
Feb 10, 2018
|
One thing I just thought about: When doing a workspace release, cargo should build everything and after everything is fine, publish all crates at once... if that is even possible. Not like "build & publish the first crate and continue for each crate" but rather "build everything, then publish everything". |
This comment has been minimized.
This comment has been minimized.
kpcyrd
commented
Mar 5, 2018
|
It seems that in a |
This comment has been minimized.
This comment has been minimized.
ufoscout
commented
Jul 31, 2018
•
|
I created a simple PR to deal with this annoying issue; it permits to execute
Unluckily I did not find a way to implement this logic because cargo requires that all the dependencies of a package are in the repository or the package phase (when the tarball is created) fails; consequently, before publishing a package with a "path" dependency, that dependency must be in the repository. |
This comment has been minimized.
This comment has been minimized.
|
Something else I would want that I don’t think that can handle is only publishing updated packages, if one of the packages already exists at its current version number it should be downloaded and verified that the new package is identical. |
This comment has been minimized.
This comment has been minimized.
softprops
commented
Oct 9, 2018
•
|
being new to workspaces but not to cargo this feels very much like a paper cut. My finger just got nipped when I tried to publish a new workspace project by following the docs ...then realized that order matters. The validation of packages will fail of one of the workspace packages depends on another in the same release but which may not have been published first. In my case it's a very simple ordering but for those new to cargo, something like |
This comment has been minimized.
This comment has been minimized.
matthiasbeyer
commented
Oct 10, 2018
|
It would definitively help me with imag where I publish over 50 crates in one release! |
This comment has been minimized.
This comment has been minimized.
softprops
commented
Oct 10, 2018
|
https://github.com/Byron/google-apis-rs and https://github.com/rusoto/rusoto would also like benefit greatly from this |
This comment has been minimized.
This comment has been minimized.
|
This sounds useful, but I'm wondering what the exact behaviour should be. What if you have a |
This comment has been minimized.
This comment has been minimized.
mitchmindtree
commented
Dec 5, 2018
•
|
@torkleyy interesting point. It probably should not modify the Cargo.toml at all, but it would be worth considering whether or not cargo should allow for E.g. If building Simplified StepsI'm imagining
It would be worth considerinng if step 4 should be a special "atomic step" recognised by crates.io so that if for some reason the net drops out or there's a crash the user doesn't end up with only half of their packages published. |
This comment has been minimized.
This comment has been minimized.
|
@mitchmindtree I would like to also see an extra step between 3 and 4 doing full workspace package validation to replace the current pre-publish validation. This does the normal per-package validation steps with 2 changes:
|
This comment has been minimized.
This comment has been minimized.
|
I started working on this here: https://gitlab.com/torkleyy/cargo-publish-all |

alexcrichton commentedJan 14, 2015
It would be nice to have a flag to
cargo publishwhich publishes all local packages in a DAG fashion.