-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed to select a version for stb_truetype
#80
Comments
Yeah, it's because smithay-client-toolkit accidentally "upgraded" their dependency of stb_truetype 17 hours ago without bumping the major version. I don't blame them, they probably thought that it was version-compatible. I told rusttype devs about this but they "don't consider compiler upgrades to be semver-breaking", and cargo ignores azuls lock file - so yay, more dependency wrangling bullshit. Thanks for reporting though, I'll see if and how I can fix it. |
No worries, I really am liking this framework! |
Yeah, I have mostly been arguing whether switching to a monorepo-style deployment would be a better idea. I can only "fix" this by either upgrading to Rust 2018 or forking every crate in the dependency chain to fix the dependency issue. This is not the first time this happened, same thing happened one month ago with dwrote. And it won't be the last time, because cargo likes to ignore the .lock file of this repo. It has to do with how cargo manages semver. At least for me it's a bigger issue, because I'd like to have a certain reliability, that my code builds, and I'm sick of fixing dependency issues every two days, switching to a monorepo style has certainly advantages for larger crates like this one, but also has huge tradeoffs, so we'll see. |
Closed in 5098ab3 |
I am freshly looking into Azul, and this vendoring of dependencies seems like a bad idea to me, leading to more maintenance work rather than less (because you no longer have tool support), and a degree of fracturing from ecosystem-wide established conventions. It genuinely makes me uneasy about whether to use Azul or not (and I won’t be alone in this discomfiture). It also leads to code duplication if my code incidentally depends on some of the same things and manages its dependencies the normal way. As far as I can tell, all you really want is to specify exact version numbers in Cargo.toml. That’s possible: just write But I do agree with you that a sprawling dependency tree of pre-1.0 crates does cause trouble from time to time. Of course, nominally pre-1.0 everything is fair game. |
Well, of course it will lead to duplicated dependencies, but from my perspective, that's easier to manage than having code break every five days. This has nothing to do with pre-1.0 / post-1.0, this has everything to do with cargo ignoring Cargo.lock files on libraries. This is a structural problem of cargo which I can't fix.
What "tool support"? Building with cargo still works fine.
No, that is not possible, because if you have two crates like this foo = "=0.1.12" and foo = "0.1" somewhere in your dependencies, cargo will simply fail to build (instead of merging the two crates or compiling both or being a bit smarter about it). In fact, that is actually what causes this issue (I specified stb_truetype as I know that it's not the "normal" way, but the "normal" way is currently extremely broken. If someone messes up semver and it breaks my code the next day five dependencies down the line and this happens over and over and over again, then that is a broken system and whether it causes discomfort or not - I quite frankly don't care. There is currently no better way, because cargo has severe structural issues here (which I reported back in March, got ignored by the cargo team). |
So long as you specify all of your dependencies as |
Maybe (it was a bad example), but cargo should compile both, then. And it doesn't, it just gives you a "failed to select a version error" like this one and fails to compile. I don't know why that is the case, but it's just what cargo does.
No - my example was bad, but you missed the point here: Let's say I put Second, that doesn't solve the problem of sliding versions - now every direct dependency is specified with an Also see #31 for the exact same error happening again. The third reason for this is that I can only fix versions of direct dependencies. It's easier to demonstrate this here:
How could I have "fixed" the semver problem of |
Description
Currently building off a forked
master
and receiving this error:I think it was broken since this commit
8c1b54f30763fb4a6a9f5af091da64392182808c
.Version / OS
azul version:
752be516036341a95a5db03c5a3620d560261f6b
Operating system: Windows 10
Windowing system (X11 or Wayland, Linux only):
Steps to Reproduce
cargo run
usingazul
as dependency.Expected Behavior
Actual Behavior
Additional Information
Tried with
edition = 2015
,edition = 2018
and no edition specified in cargo manifest.The text was updated successfully, but these errors were encountered: