Skip to content

Commit

Permalink
chore(ci): Bundle crates under the same version_group (#1572)
Browse files Browse the repository at this point in the history
This should solve the diamond problem we had where `hugr-core` get's a
breaking release but `hugr-passes` only publishes a minor, so cargo
automatically updates the latter and we get diverging `hugr-core`
versions on the dependency tree (so the public APIs break).

`version_group` defines a grouping of versions, where packages **that
had changes** will all be bumped to the same version.
https://release-plz.ieni.dev/docs/config#the-version_group-field

In the previous example, a mayor bump to `hugr-core` will cause a mayor
release for both `hugr-passes` and `hugr`.
On the other hand, a change to `hugr-passes` will **not** trigger a bump
on `hugr-core`.

An alternative (non-automated) solution to this problem can be done via
the `semver-trick` \[0,1\], but that's a one-off manual solution more
useful to avoid problems for external libraries.

- \[0\]:
https://doc.rust-lang.org/cargo/reference/resolver.html#version-incompatibility-hazards
- \[1\]: https://github.com/dtolnay/semver-trick
  • Loading branch information
aborgna-q authored Oct 11, 2024
1 parent 2f7d02c commit 4f0e272
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,24 @@ commit_parsers = [
name = "hugr"
changelog_include = ["hugr-core", "hugr-passes"]
release = true
version_group = "hugr"

[[package]]
name = "hugr-core"
release = true
version_group = "hugr"

[[package]]
name = "hugr-passes"
release = true
version_group = "hugr"

[[package]]
name = "hugr-cli"
release = true
version_group = "hugr"

[[package]]
name = "hugr-model"
release = true
version_group = "hugr"

0 comments on commit 4f0e272

Please sign in to comment.