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

Set default-features = false for image dependency #42

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

SamWilsn
Copy link
Contributor

Once enabled, there's no way to disable a cargo feature, so as a library, rxing probably shouldn't enable all the formats supported by the image crate.

This PR conditionally disables tests that depend on the image or image-formats features, introduces the image-formats feature and enables it by default, and adds a test step to the GitHub Actions workflow to test the crate with default features disabled.

@hschimke
Copy link
Collaborator

I'll admit my ignorance here, is the issue over-inclusion of dependencies?

I'll review the PR this weekend, I should have time then, I'm trying to finish up some ports from the C++ version.

@SamWilsn
Copy link
Contributor Author

Yep, that's pretty much it. Imagine I'm writing an application that'll only ever need to decode from PNGs. Because rxing depends on image's default features, there's no way for me to disable all the other image formats.

@hschimke
Copy link
Collaborator

I appreciate the explanation! Given that, this change makes sense to me. I should have time to review this weekend.

Copy link
Collaborator

@hschimke hschimke 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, pending test completion

@hschimke hschimke merged commit d2b3bf6 into rxing-core:main Jan 16, 2024
1 check passed
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