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

Disable default regex features #144

Open
jirutka opened this issue May 9, 2023 · 2 comments
Open

Disable default regex features #144

jirutka opened this issue May 9, 2023 · 2 comments

Comments

@jirutka
Copy link

jirutka commented May 9, 2023

To avoid infecting the dependency graph with potentially unwanted regex features. If the user wants extra regex features, they should enable them in their project (e.g. just add a dependency on "regex" with default features enabled).

PR #143

@vincentdephily
Copy link

This would be a welcome change, as regex features are a nice low-hanging fruit when reducing bloat.

I wonder about perf-* features vs unicode-* features though: while a missing unicode feature will probably show up during testing and the devs will realize that they need to opt in, a missing perf feature might just silently make the binary or the unittests slower. Since they don't cause as much binary bloat (just longer compile times), maybe it makes sense to leave those in for predicate-rs.

@epage
Copy link
Contributor

epage commented May 18, 2023

This is a tough one because

  • This is a subtle breaking change (runtime behavior, rather than APIs)
  • I'd rather not people have to depend on regex to get the features they want but I also don't want to re-exporting
  • In a lot of cases, I can see someone wanting things to "just work" and adding extra hoops could be frustrating.

I think I'd be more inclined to make the regex feature off by default instead. That could also possibly be done in mockall, I'm not aware of its design to say whether it needs it or not (which is how starship is pulling in predicates, I presume)

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