revm icon indicating copy to clipboard operation
revm copied to clipboard

SemVer violation in `[email protected]`

Open xJonathanLEI opened this issue 1 year ago • 2 comments

revm-interpreter bumped its version from 10.0.2 to 10.0.3 here: https://github.com/bluealloy/revm/commit/4f093996c6059aad4db02b7eb03dca13e13be8a1#diff-39002a8f7750a6f47016f15b058b99efb706c660821f76fbb8a7740c9814b45a

But at the same time, it's also bumping revm-primitives from 9.0.2 to 10.0.0. Since revm-interpreter does not just use revm-primitives internally, but also as part of its public API, this is a SemVer violation and breaks downstream libraries and applications.

Since revm-interpreter is also used by say revm, these other crates are also broken as a result.

For a library that depends on say revm-interpreter v10.0.1, it might also import revm-primitives 9 to use with the interpreter. Now when it's imported by apps/libs further downstream they wouldn't use the library's lock file (if any) but instead resolve to the latest version on crates.io, which means a revm-interpreter version that excepts revm-primitives 10, and now the library's code stops working.

I remember this happened a while ago as well, so I decided to post it here to raise awareness.

xJonathanLEI avatar Sep 30 '24 18:09 xJonathanLEI

Oh btw this is probably not worth yanking and re-relasing. Sending this pretty much just as a heads up that downstream libs are being broken :)

xJonathanLEI avatar Oct 01 '24 18:10 xJonathanLEI

Oh btw this is probably not worth yanking and re-relasing. Sending this pretty much just as a heads up that downstream libs are being broken :)

I will leave this github issue open as a reminder for the future :)

rakita avatar Oct 17 '24 18:10 rakita

Closing it, we started doing mostly the major number bumps when we have dependency bumps that are used by other projects.

rakita avatar Mar 13 '25 17:03 rakita