assert-rs / predicates-rs

Boolean-valued predicate functions in Rust
docs.rs/predicates
Apache License 2.0
168 stars 29 forks source link

Disable default regex features #144

Open jirutka opened 1 year ago

jirutka commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

This is a tough one because

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)