Amanieu / parking_lot

Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to update parking_lot's dependency on parking_lot_core

peterthejohnston opened this issue · comments

parking_lot_core's dependency on windows-sys was recently updated from v0.33.0 to v0.34.0. What's the process for updating parking_lot's dependency on parking_lot_core? I suppose it would require tagging a new release of the latter, and then updating the root crate to depend on the new release of core?

Am I understanding this change, for example, correctly that it does those things simultaneously?

There is no need for a release of parking_lot, a minor release of parking_lot_core is enough, as the last one.

But parking_lot depends specifically on parking_lot_core = "0.9.0", so a new minor release of core wouldn't result in its being pulled into parking_lot.

So I think if I want parking_lot to transitively depend on the latest windows-sys, both parking_lot_core and parking_lot have to be released.

That is not the case. 0.9.0 is semver compatible with 0.9.1, so just releasing parking_lot_core 0.9.1 would be enough.

I know that it's semver compatible, but I guess what I'm getting at is that if I were to cargo vendor parking_lot, I'm pretty sure it would pull in parking_lot_core 0.9.0 since it is explicitly pinned to that version, rather than "0.9" for example. Am I missing something?

parking_lot is not pinned to 0.9.0. It is pinned to any version semver compatible to 0.9.0, which includes 0.9.1:

parking_lot_core = { path = "core", version = "0.9.0" }

Gotcha, I didn't realize that specifying a full version worked that way. Thanks for clarifying.

This should do it: #334

Although a maintainer would need to publish the new release to crates.io.