Closed dmbfm closed 2 months ago
I've made ravif
demand 1.79, because a dependency of rav1e
— bitstream-io
— started using inline const syntax, which requires 1.79. If you didn't get the version error on ravif
, you'd get even more confusing build errors.
You can build it on older Rust if you downgrade bitstream-io
to 2.3.0 and ravif
to 0.11.5
cargo update
cargo update ravif --precise 0.11.5
cargo update bitstream-io --precise 2.3.0
It's not much of an issue for me really but if the MSRV of the image crate is 1.67.1
, shouldn't it ideally work with the default features of the crate?
The crate may be compatible with an older version of Rust itself, but it can't control what the 3rd party dependencies are doing. Pinning dependencies to older versions has other project-breaking consequences. Cargo doesn't have ability to select dependencies based on Rust compatibility yet (in stable releases), so if you need to work with an older version of Rust, you need to downgrade dependencies yourself.
Got it. Thanks!
@dmbfm This is quite recent and likely very relevant: https://github.com/rust-lang/cargo/issues/13873 Although it doesn't exist at the Rust toolchain version you're looking for (except with hacks over installing a much newer cargo than rustc
detailed in the thread, maybe it actually would work) that's the workflow which should be working one day. The tooling team is likely to be very interested in your issue and whether it'd be solved by that implementation.
MSRV-aware resolver unfortunately doesn't fix this, because bitstream-io
2.4.0 added 1.79-requiring code without rust-version
. They've fixed it in 2.4.1, but MSRV-aware cargo downgrades to 2.4.0 only, not to 2.3.0.
In CI we do validate that -Z minimal-versions
compiles with the MSRV Rust version. You'd be missing out on lots of bug fixes and such, but at least it allows you to identify one consistent set of dependency versions that work
I am using macOS Sonoma 14.4.1, rustc/cargo version 1.77.2. When trying to use the
image
crate with the default features enabled I get an error about the minimum required rust version.Expected
Since the minimum version for the
image
crate is1.67.1
, the program should build correctly.Actual behaviour
I get the following message when trying to run
cargo build
:Reproduction steps