flate2-rs icon indicating copy to clipboard operation
flate2-rs copied to clipboard

1.1.7 have breaking change about feature `zlib-rs`

Open youknowone opened this issue 2 weeks ago • 4 comments

-zlib-rs = ["any_zlib", "libz-rs-sys"]
+zlib-rs = ["any_impl", "dep:zlib-rs"]

zlib-rs doesn't enable any_zlib anymore, so APIs under any_zlib like Compress::new_gzip, Compress::set_dictionary became unexisting.

introduced by 5b24d983 (#513)

I assume this might be intended, but it is surprising change between 1.1.5 -> 1.1.7 because I can't pin the version as 1.1

What will be the migration guide in that case?

related: #515

youknowone avatar Dec 07 '25 01:12 youknowone

Thanks a lot for sharing!

This certainly means that neither me nor the other reviewer nor the author fully understand our feature toggles. It also means that CI isn't able to detect this kind of breakage, which is understandable if it uses the same toggles to turn on or off certain tests.

Let's start with amping up the documentation around any_zlib and any_impl, and see if we can get towards a fix from there.

Meanwhile, the latest release was yanked.

Byron avatar Dec 07 '25 06:12 Byron

I think it's now reasonably clear what needs to be done. Namely, zlib-rs needs pure Rust versions of set_dictionary and set_level to be a full replacement. My apologies for the oversight.

Byron avatar Dec 07 '25 08:12 Byron

Thank you so much! is there anything I can help?

youknowone avatar Dec 07 '25 11:12 youknowone

Thanks for offering, but I don't think so. zlib-rs without C bindings is back to the drawing board for now, and a new release can be made once these are sorted.

Byron avatar Dec 07 '25 14:12 Byron