axodotdev / axodotdev/cargo-dist
Support semi-unified versions as a release workflow
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
I think cargo-dist will largely already Do The Right Thing for this workflow but we should test/document it properly.
This is a workflow @epage described, and is used by [clap](https://github.com/clap-rs/clap). Essentially it's the same as "all versions are bumped in lockstep" *but you don't bother bumping a version for a library if it didn't change*. This is something that would work perfectly for cargo-dist and many of the workspaces I use fully-unified versions in.
Here's what it would look like in cargo-dist:
Since everything in the workspace goes into cargo-dist, every git tag is definitely bumping the version of that crate. However, cargo-dist-schema is updated much less often, so currently we do a lot of "nothing changed" releases for no real reason other than having the versions exactly the same.
However we could instead just say: yeah cargo-dist 0.2.0 uses cargo-dist-schema 0.1.0, because nothing changed in the schema in that version jump. But if 0.3.0 does need a schema change (say a new field is added), then we cut 0.3.0 for *both* crates, skipping over 0.2.0 for cargo-dist-schema.
This is also a lot friendlier to people depending on the libraries, as version resolution will be less finicky. Note that cargo-release already will complain to us when we needlessly cut a new cargo-dist-schema, so there's tooling to help you select the new release. I need to look into the exact cargo-release config that works best for this.
Note however that cargo-dist will probably still have a few "useless" releases due to prerelease/bootstrapping shenanigans.
Contributor guide
Research direction
Start by reviewing the cargo-dist release workflow and the cargo-release configuration, then compare the fully unified and semi-unified versioning workflows described for clap and cargo-dist-schema. Confirm how unchanged workspace libraries are handled, how releases requiring a schema change are selected, and document the supported behavior and any remaining prerelease or bootstrapping exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100