-
Notifications
You must be signed in to change notification settings - Fork 115
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
Support Workspace Releases #66
Comments
If you like, I could start by putting a PR for this together. After looking at the code base, I think this would need some more refactoring. I would propose to move to |
Cool! Workspace support is always welcomed. Can toml-edit retain the format or any comments in toml file? That's the reason I was manually update the cargo file. |
In the latest version it can. It is what cargo-edit uses under the hood. I’ve got a local experiment running, will try to clean it up over the next days and create a pull request. |
Thanks @jan-auer . Looking forward to your PR. |
Is there any news on this? This is currently breaking my workflow quite massively 🙁 |
This is interesting. Anyway, to be really useful, it should handle also dependencies specified by an internal "path": [dependencies]
intra_workspace_lib = { path = "../intra_workspace_lib" } @jan-auer |
@ufoscout Unfortunately I haven't had enough time lately, and it turned out to be a major refactor. Not sure when I'll get back to this... |
@ufoscout @jan-auer I started working on this: https://github.com/spacekookie/cargo-ws-release At the moment it's non functional but I will try to finish it next week (before RustConf craziness 😬) It's approach is to build a dependency graph between workspace dependencies so that a release can bump appropriate versions in referencing crates. There are a few simple issues someone could tackle if they wanted to help out before that. |
@spacekookie that was great! Do you think it's good idea to make it a library, which generates an iterator that walks through the cargo workspace? We can then call |
@sunng87 well, just calling But yea, turning it into a library and integrating it into cargo release is probably not a bad idea down the road |
yea, I think transform |
cargo-release does not support workspace-wide releases (meaning, all crates in the workspace should be updated to the same version in the same commit). There is ongoing work to make this possible: * https://github.com/spacekookie/cargo-ws-release * crate-ci/cargo-release#66 For the next couple of releases, I will follow in the footsteps of the previous "cargo-release"-releases, and hopefully either workspace support becomes available by then, or I find some spare cycles to help finish the work that was started on that feature.
Progress
Once I finish with #77, cargo-release will be able to handle releasing a crate-at-a-time within a workspace. Once the rest of cargo-release works off manifest path, it could then easily be extended to support a release-all-at-once. |
@epage have you had a look at spacekookie/cargo-ws-release#9 ? |
I had looked at cargo-ws-release but did not notice the PR. I'm unsure if ill get to adding |
So not ready to work directly on this yet but starting to give it some thought. For example, I think I'm going to create a I would want an optional feature to integrate with
We could provide a function on the workspace struct that partitions the So one thing I'll need to know is how these flags interact. If anyone knows already, great! Otherwise, I'll have to either figure it out empirically or by digging into the code. Examples of things to know
EDITS:
|
|
We now have layered config, including a config in the workspace root. See #111 |
This is effectively calling `cargo-release` for each package. For example, it does nothing to consolidate verson bump commits before or after the release. This uses `clap-cargo` to try to mirror `cargo`s logic for selecting packages within a workspace. This does have a bug wherein the packages are not released in dependency order. Fixes crate-ci#66
In workspace projects, it is often desired to create coordinated releases with all package versions bumped at the same time. This includes upgrading versions in dependent crates. It would be great to have some sort of workspace flag, that performs all upgrades in a single commit (and tag).
Maintainer Notes
Steps
clap-cargo
to at least contain workspace flags, making the processing ofcargo-metadata
reusable for other pluginsThe text was updated successfully, but these errors were encountered: