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

Make lz4 module optional #246

Merged
merged 4 commits into from
Apr 19, 2024
Merged

Make lz4 module optional #246

merged 4 commits into from
Apr 19, 2024

Conversation

kravets-levko
Copy link
Contributor

Fixes #245

lz4 module is partially built from C sources during installation. This process requires some build tools available on user's machine. While on Linux machines it's typically available, it may not be true for others. Unfortunately, we cannot replace lz4 by other library because it's the only LZ4 implementation for Node that supports LZ4 frame API.

Proposed solution is to make lz4 dependency optional. With this change, package manager won't fail if lz4 cannot be installed, but we should be ready that lz4 dependency may be missing. When it's not available, we completely disable LZ4 support in the library - don't sent canDecompressLZ4Result to Thrift server, and add guards everywhere lz4 is used.

Signed-off-by: Levko Kravets <levko.ne@gmail.com>
Signed-off-by: Levko Kravets <levko.ne@gmail.com>
Copy link
Contributor

@benc-db benc-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but for long term maintainability, would like LZ4 to be renamed to something a little more obvious of what it is used for (per my comment)

lib/DBSQLSession.ts Show resolved Hide resolved
@kravets-levko kravets-levko merged commit 1fd9e1e into main Apr 19, 2024
8 checks passed
@kravets-levko kravets-levko deleted the make-lz4-optional branch April 19, 2024 16:34
@databricks databricks deleted a comment from codecov-commenter Apr 19, 2024
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

Successfully merging this pull request may close these issues.

lz4 dependency is causing install issues for our users
2 participants