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 dependency on "failure" optional #14

Merged
merged 1 commit into from
Sep 16, 2019
Merged

Make dependency on "failure" optional #14

merged 1 commit into from
Sep 16, 2019

Conversation

prokopyl
Copy link
Contributor

While being compatible with failure is nice, the way it is currently done in this library forces the dependency on all users of this crate, even if they do not use it at all.

The biggest example of this issue is bindgen, the biggest dependent of this crate but which does not use failure, hence making everybody that uses bindgen depend on failure (and all its dependencies) for pretty much nothing.

This PR makes the dependency on failure optional, by creating a new use_failure feature that controls whether or not the dependency on failure is enabled.
This feature is enabled by default to avoid any breaking changes, but it can be disabled by any dependent crate that does not wish to use failure and can get rid of the extra dependency.

The CI configurations were also updated, so they run tests in both configurations: with and without default features enabled.

@harryfei
Copy link
Owner

Thanks for this PR.

@harryfei harryfei merged commit 03c1766 into harryfei:master Sep 16, 2019
@prokopyl
Copy link
Contributor Author

You're welcome!

Do you plan to release a new version on crates.io soon? I would like to upstream those changes to bindgen (and maybe a few others) as soon as possible. 🙂

@harryfei
Copy link
Owner

@prokopyl I will release a new version today.

@prokopyl
Copy link
Contributor Author

@harryfei Great, thank you!

@harryfei
Copy link
Owner

@prokopyl New version (3.0.0) has been published.

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