ZKVM-1310: semver-checks: Implement checking of crate dependency version requirements #3074
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We had an issue where we ended up breaking the 1.2.X build of the risc0 crates when we published 1.4.X versions of crates as part of the 2.0.0 release. This was because the 1.4.X crates ended up depending on 2.0.X versions of crates (
risc0-core
andrisc0-zkp
at a minimum) which conflicted with dependencies in other 1.2.X crates. This caused cargo to include both versions. This can be okay, but in this case it causes issues where the types are incompatible (because there are two different versions of these crates).This adds a check to semver-checks that sees if a crate has a workspace dependency version requirement increase in major version, and if it does, we require that crate to also bump its major version. In the above situation it should have forced the 1.4.X crates to bump their versions to 2.0.X.