Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit tweaks the features enabled for the
regex-syntax
cratefrom the
regex
crate itself. This isn't intended to actually have anyfunctional change, but should help feature unification for Cargo in some
projects.
One project I work on exhibits an issue where executing
cargo build
followed by
cargo test
will rebuildregex-syntax
and all of itstransitive dependencies. The cause for this issue is that the tests are
using the
proptest
crate. Theproptest
crate depends onregex-syntax
with normal features (e.g. the defaults). All othercrates depend on
regex
with normal default features too.The problem happens where when only the
regex
crate depends onregex-syntax
then thedefault
andunicode
features ofregex-syntax
are disabled. This is because theregex
crate disablesdefault features and
regex
'sunicode
feature delegates to all theindividual features of
regex-syntax
. When theregex-syntax
crate isdepended on directly by
proptest
it then enables thedefault
andunicode
features ofregex-syntax
.Functionally these two builds of
regex-syntax
are exactly the samesince
default
is simply a proxy forunicode
andunicode
is simplyan umbrella including other features.
This PR updates the features enabled on
regex-syntax
by theregex
crate in two ways:
default
feature forregex
enablesregex-syntax/default
.unicode
feature forregex
enables theregex-syntax/unicode
feature.
This makes is so that if another crate in your crate graph depends on
regex-syntax
then it'll have, by default, the same set of featuresenabled than if you also depend on
regex
.