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 the serde feature opt-in instead of opt-out #200

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

faern
Copy link
Contributor

@faern faern commented Sep 24, 2024

Like what I said in my earlier PR where I made the serde feature optional (#109): Having dependencies be optional but pulled in by default is often negative. Most people add dependencies without checking their features or optional dependencies too carefully. This leads to them pulling in transitive dependencies they likely don't need.

I can opt out of the serde dependency, sure. But! Now I want to try out the const-addrs crate to easily create IP types from macros with compile time validation. This crate depends on ipnetwork without opting out of the default features. This means that I now get serde as a transitive dependency, even though I really don't need serde for anything. It's a rather large dependency to compile for no real use.

Most people add dependencies without checking their features
or optional dependencies too carefully. This leads to them pulling in
transitive dependencies they likely don't need.
@achanda achanda merged commit d665bb6 into achanda:master Sep 24, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Jan 6, 2025
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