Skip to content

Avoid using a version range for windows-sys; causes non-deterministic version resolution#24

Open
joshtriplett wants to merge 1 commit into
BurntSushi:masterfrom
joshtriplett:no-version-range
Open

Avoid using a version range for windows-sys; causes non-deterministic version resolution#24
joshtriplett wants to merge 1 commit into
BurntSushi:masterfrom
joshtriplett:no-version-range

Conversation

@joshtriplett

Copy link
Copy Markdown

Cargo's version resolver doesn't handle version ranges like this very
well, resulting in non-deterministic flip-flopping of versions.

rust-lang/cargo#9029
rust-lang/cargo#5529
https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Cargo.2Elock.20non-deterministically.20flipflopping/with/520024108

@BurntSushi

Copy link
Copy Markdown
Owner

Ref #19 and cc @ChrisDenton

@joshtriplett

Copy link
Copy Markdown
Author

@BurntSushi The issue here is that this will often cause crates to use multiple versions of windows-sys when they otherwise wouldn't have, because cargo can't necessarily say "oh, if I used the latest version I'd only need one version". And not only that, but cargo will go back and forth between versions of windows-sys when doing other unrelated updates that cause a new resolve.

@ChrisDenton

Copy link
Copy Markdown
Contributor

Hm, this is unfortunate. The thing is, it doesn't seem to matter if there's six months or a year between windows-sys releases, there will always be major crates that are a version or two behind.

If this is the better of the two options then I'm grudgingly ok with it. But maybe I should try to encourage more use of windows-bindgen. It feels wasteful for every project to be generating their own bindings but at this point I think it's the least worse option.

@BurntSushi

Copy link
Copy Markdown
Owner

I'm very open to using windows-bindgen. I think I just haven't had the time to sit down and do it.

@ChrisDenton

Copy link
Copy Markdown
Contributor

Ok, I made #25 to see what that would look like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants