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

Remove default dependency on bitvec #1287

Closed
djc opened this issue Feb 15, 2021 · 4 comments
Closed

Remove default dependency on bitvec #1287

djc opened this issue Feb 15, 2021 · 4 comments
Milestone

Comments

@djc
Copy link
Contributor

djc commented Feb 15, 2021

The bitvec crate does not appear to be fundamental to nom, yet it's enabled by default. It also brings in several rarely-used dependencies on its own (funty, radium, tap, wyz). Even if I disable default features, I cannot currently reenable std features without also enabling the bitvec feature (hopefully weak feature deps are coming soon). In the meantime, I think it would be better if default, alloc and std did not enable bitvec by default -- instead we could provide a separate bitvec feature and potentially bitvec-alloc/bitvec-std flags (or just leave those to downstream crates to manage).

Unfortunately I suppose this would be a semver-breaking change, but given the breakage today due to bitvec dependencies, it would maybe be nice to get this done sooner rather than later.

@djc
Copy link
Contributor Author

djc commented Feb 15, 2021

(I'm happy to do the legwork on this if we're aligned on the goals/timeline.)

@Geal
Copy link
Collaborator

Geal commented Feb 18, 2021

there's no defined timeline for the next major version of nom, but I'd be happy to see a better way around cargo features. I'll check if there's other breaking changes I need to pass at the same time

@tweksteen
Copy link

FYI, this issue is also relevant for Android (AOSP). We try to minimize the number of crates we rely on and therefore carefully enable features to limit new dependencies. We have imported Dirkjan's patch, until the next release of nom occurs.

@Geal Geal added this to the 7.0 milestone Aug 13, 2021
@Geal
Copy link
Collaborator

Geal commented Aug 21, 2021

bitvec input types are now in the nom-bitvec crate, since the release of nom 7: https://crates.io/crates/nom/7.0.0

@Geal Geal closed this as completed Aug 21, 2021
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

No branches or pull requests

3 participants