mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
Every workspace gate with `--all-features` has been failing since #2135 taught craft-image-codecs to read JPEG XL behind a `jxl` feature. The capability test asserted that JXL read is `Unsupported`, full stop. With that codec feature on, `capabilities()` forwards the codec's own answer of `Available`. The assertion then fails. This crate cannot read that feature through `cfg!`. The feature belongs to a dependency. A workspace build turns it on without this crate selecting anything. An equality against either value is therefore wrong in some build. The test now asks the codec the same question the code asks it. It compares the two answers. A build whose codec reads JXL must report `Available`. One whose codec does not must report `Unsupported`. The mapping has to exist either way. A missing codec therefore fails an assertion of its own. The comparison is never quietly skipped. Without `raster-codecs` there is no codec to ask. The answer is `Unsupported`. Verified at 1.100.0 on Linux. `cargo test -p craft-file-formats -p craft-image-codecs --all-features --locked` runs the case that was failing and passes. The same test passes with `-p craft-file-formats --all-features` and with `--no-default-features`. clippy with `--all-targets --all-features -D warnings` is clean. `cargo fmt --check` is clean. Making `capabilities()` ignore the codec's read flag fails the test. That is what the comparison is for. The HEIF and deep-EXR failures in that package need the pinned corpus. My checkout has not fetched it.