elast0ny / shared_memory

A Rust wrapper around native shared memory for Linux and Windows
382 stars 51 forks source link

Release 0.12.1 breaks semver (requires edition 2021 where 0.12.0 didn't) #80

Closed p-avital closed 2 years ago

p-avital commented 2 years ago

Hi,

Just to let you know, when switching to edition = "2021" in Cargo.toml, you should have bumped to 0.13.0 rather than 0.12.1, as shared_memory now breaks building for projects that depend (even transitively) on 0.12.0 when they run cargo update.

I think you can still fix that, by re-publishing as 0.13.0, and going on crates.io to yank 0.12.1

I detected the issue when running cargo update on a lib that had a transitive dependency on 0.12.0, if anyone sees this issue because they ran into something similar, quickest fix is to add shared_memory = "=0.12.0" to your deps, then run cargo update again.

Sorry, I seem to pester you quite a bit on these publishing matters, let me know if you try the yanking thing :)

p-avital commented 2 years ago

After using git-blame to try and find out why you switched to edition="2021", I can't really figure out why you did?

If you simply did it "because you could", I'd advise rolling this back, as this breaks compatibility with any crate that uses edition="2018", as well as any compiler before 1.56 (this causes issues in environments such as ROS where the latest available version is 1.51 if I remember correctly).

elast0ny commented 2 years ago

I will yank 12.1 and publish 12.2 with the reverted edition back to 2018.

My only reason for updating the edition was to keep everything "up-to-date" but like you said, this doesn't really have any benefits and as I've learned, the trade off is that it breaks backwards compatibility with old compilers. If i do chose to update the edition, I will remember to bump the minor version ;)

Thanks for the issue !