I have a dependency for which the latest update works on Linux but has problems on Windows. So I tried using platform-specific versions, but it's erroring out, and IDK how to get around it. Here's the relevant portion of Cargo.toml
:
[target.'cfg(windows)'.dependencies]
roead = "= 0.10.3"
[target.'cfg(not(windows))'.dependencies]
roead = "0.10.4"
The result:
error: failed to select a version for `roead`.
... required by package `bcml v3.9.10 (D:\a\BCML\BCML)`
versions that meet the requirements `=0.10.3` are: 0.10.3
all possible versions conflict with previously selected packages.
previously selected package `roead v0.10.4`
... which satisfies dependency `roead = "^0.10.4"` of package `bcml v3.9.10 (D:\a\BCML\BCML)`
failed to select a version for `roead` which could resolve this conflict
But when I use other methods of specifying the version I either get 0.10.4 for both or (with <0.10.4
) just the earliest (0.9.0
).
So how can I actually end up with 0.10.3 on Windows and 0.10.4 on Linux?