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

Emit error if Allsorts is built without one of the flate2 features #55

Closed
wants to merge 1 commit into from

Conversation

wezm
Copy link
Contributor

@wezm wezm commented Jan 18, 2022

Fixes #53

If Allsorts is built without one of the flate2 features enabled emit a compile error with a message indicating this. The flate2 dependency is also marked optional so that in this case we a avoid a bunch of cryptic errors from trying to build that crate without a backend. There are still errors originating from Allsorts attempting to use flate2 when it's not been pulled in but there's fewer of them and they're a bit more obviously tied to the flate2 dependency.

@LoganDark
Copy link
Contributor

LGTM!

@wezm
Copy link
Contributor Author

wezm commented Jan 18, 2022

For future reference this is what the errors look like:

Screenshot from 2022-01-18 10-32-49

@LoganDark
Copy link
Contributor

LoganDark commented Jan 18, 2022

Have you tested what happens when they are both enabled? It should just work then, right?

@wezm
Copy link
Contributor Author

wezm commented Jan 18, 2022

Have you tested what happens when they are both enabled?

Yes, flate2 builds ok. It appears to use zlib in that case

@wezm
Copy link
Contributor Author

wezm commented Jan 18, 2022

Merged manually.

@wezm wezm closed this Jan 18, 2022
@wezm wezm deleted the allsorts-flate-features branch January 18, 2022 01:27
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.

Use compile_error! when both flate2_zlib and flate2_rust features are disabled
2 participants