Skip to content

Conversation

@Cyan4973
Copy link
Contributor

@Cyan4973 Cyan4973 commented Dec 18, 2025

This is something we have meant to do for a while now,
so it's about time:
read support for experimental formats (prior to v1.0) is now dropped by default.

The need for such a capability is expected to be close to zero nowadays,
but should some special application still need it, it can still be enabled manually.

This change triggers an update of the version number to v1.6.0.

Cyan4973 and others added 5 commits December 18, 2025 12:59
can still be changed manually by setting `ZSTD_LEGACY_SUPPORT` to a different value
can still be explicitly enabled
to reflect the relatively big scope change by removing support of legacy formats.
Summary:
Completes the transition to disabled legacy support by default across all build systems. This follows up on the previous Makefile and CMake changes to ensure consistent default behavior regardless of the build system used.

Updated build configurations: Meson, tests/Makefile, Visual Studio 2008/2010 projects, and BUCK.

Test Plan:
Verified changes compile correctly via `make lib-release`. Build system configurations have been updated consistently across all platforms.
@Cyan4973 Cyan4973 self-assigned this Dec 18, 2025
@meta-cla meta-cla bot added the CLA Signed label Dec 18, 2025
Summary:
Updates the library build tests to reflect that legacy format support is now disabled by default. Also adds a new test case to verify that legacy support can still be explicitly enabled via ZSTD_LEGACY_SUPPORT=5.

Test Plan:
Run `bash tests/libzstd_builds.sh` on a Linux environment.
Summary:
The version compatibility test needs to decode legacy frames (v0.5.x - v0.7.x) to verify cross-version interoperability. Since legacy support is now disabled by default (v1.6.0), head must be built with ZSTD_LEGACY_SUPPORT=5 for this test.

Test Plan:
Run `python3 tests/test-zstd-versions.py` to verify cross-version compatibility testing works correctly.
Summary:
Some old zstd versions (notably v0.6.x) have a bug in fileio.c where header includes check for `ZSTD_LEGACY_SUPPORT==1` but code usage checks for `ZSTD_LEGACY_SUPPORT>=1`. Using value 5 causes compilation failure because headers aren't included but the code tries to use legacy functions.

Changing to `ZSTD_LEGACY_SUPPORT=1` for old version builds fixes the compilation while still enabling legacy format support.

Test Plan:
Run `make versionsTest` or `python3 tests/test-zstd-versions.py` to verify all old versions compile and cross-version decompression works correctly.
@Cyan4973 Cyan4973 mentioned this pull request Dec 19, 2025
@Cyan4973 Cyan4973 merged commit ae9f20c into dev Dec 19, 2025
105 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants