Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd_legacy.h is missing - include attempted when ZSTD_LEGACY_SUPPORT is defined #113

Closed
TurtleSimos opened this issue Jan 18, 2016 · 7 comments

Comments

@TurtleSimos
Copy link

ZSTD_LEGACY_SUPPORT if not defined is defined to 1 in zstd_decompress.c

Then later in the file:

if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT==1)

include "zstd_legacy.h"

endif

However, zstd_legacy.h isn't present on github.

@Cyan4973
Copy link
Contributor

It is present in the legacy folder

The provided Makefile is supposed to automatically include this directory.

@TurtleSimos
Copy link
Author

Ah, my mistake - I was updating ZStd in lzbench, which doesn't have the folder.

How about defaulting ZSTD_LEGACY_SUPPORT to 0, so that the legacy folder is only required if specifically desired?

@Cyan4973
Copy link
Contributor

It's a matter of preference.
I'm not sure whichever option is better "by default".
So I opted for the "safer" one, so that people / projects having used Zstd prior version don't get accidentally blocked.

@TurtleSimos
Copy link
Author

Sure, understood. I was assuming from the major version being zero, that api changes were assumed to be okay at any time. That is minor issue with semantic versioning before the first major release.
Thank you.

@Cyan4973
Copy link
Contributor

Actually, thinking again about it, something I could do and feels logical :

  • when built using the default provided Makefile : set ZSTD_LEGACY_SUPPORT to 1
  • when file is just being copy pasted into another project and no ZSTD_LEGACY_SUPPORT value is provided, set it to 0

This way, when including zstd into another project, the expectation, in general, is to not need additional legacy files.

@TurtleSimos
Copy link
Author

That looks to be a very good solution to me. It is difficult to balance having the code out there for people to use and report bugs etc, before committing to a major version. Keeping the main lib folder as current and self sufficient would make adoption easy, while minimizing the penalty for early adoptors to migrate to changes.

@Cyan4973
Copy link
Contributor

pushed into dev branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants