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

Add feature flags for compression algorithms #241

Merged
merged 4 commits into from
Oct 16, 2024

Conversation

famfo
Copy link
Contributor

@famfo famfo commented Oct 16, 2024

This pull request adds a feature flag for every compression algorithm. All compression algorithms are all enabled by default, but can be disabled in case they are not used to reduce the amount of dependencies.

Please note: I couldn't run all the tests because some containers are not found in the registry I am using.

src/rpm/compressor.rs Outdated Show resolved Hide resolved
@famfo
Copy link
Contributor Author

famfo commented Oct 16, 2024

What should I do about the failing tests on no-default-features? I could disable the tests which need a specific compression for now.

Cargo.toml Outdated Show resolved Hide resolved
src/rpm/compressor.rs Outdated Show resolved Hide resolved
@dralley
Copy link
Collaborator

dralley commented Oct 16, 2024

What should I do about the failing tests on no-default-features? I could disable the tests which need a specific compression for now.

Flag the test on the availability of the compression for now I suppose.

Could you explain your motivation for the PR - is it just reducing dependencies in a use case that doesn't require them? (That's perfectly fine, I'm just curious)

@famfo famfo force-pushed the compression-featureflags branch from 20df642 to 1ca18c9 Compare October 16, 2024 15:47
@famfo
Copy link
Contributor Author

famfo commented Oct 16, 2024

Mostly a use case that doesn't require anything else than zstd and we'd like to reduce the amount of C code we link against.

CHANGELOG.md Show resolved Hide resolved
@famfo famfo force-pushed the compression-featureflags branch 2 times, most recently from dd61e5f to b7a93b9 Compare October 16, 2024 17:39
famfo added 4 commits October 16, 2024 19:42
This commit adds a feature flag for every
compression algorithm. All compression algorithms
are all enabled by default, but can be disabled
in case they are not used to reduce the amount
of dependencies.
@famfo famfo force-pushed the compression-featureflags branch from b7a93b9 to 98f70fa Compare October 16, 2024 17:42
Copy link
Collaborator

@dralley dralley left a comment

Choose a reason for hiding this comment

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

Thanks!

@dralley dralley merged commit 2f7ecb6 into rpm-rs:master Oct 16, 2024
15 checks passed
@dralley
Copy link
Collaborator

dralley commented Oct 16, 2024

Do you have more changes planned? If not I can do a new release, otherwise I can wait.

@famfo
Copy link
Contributor Author

famfo commented Oct 17, 2024

Decompressing content from archives would still be nice but implementing that would probably still take a few days.

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.

2 participants