regex 1.0 by BurntSushi · Pull Request #471 · rust-lang/regex (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation0 Commits10 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

BurntSushi

This PR collects a series of changes that should let us release regex 1.0. For the most part, these changes consist of the things listed in #457, along with miscellaneous cleanups like converting uses of try! to ?.

We declare that the minimum supported version of Rust for regex 1.0 will be Rust 1.20.0 (regex 0.2 requires Rust 1.12 or newer).

Closes #457

@BurntSushi

This also clarifies our policy on increasing the minimum Rust version required. In particular, we reserve the right to increase the minimum Rust version in minor version releases of regexes, but never in patch releases. We will default to a reasonably conservative interpretation of this policy, and not bump the minimum required Rust version lightly.

If this policy turns out to be too aggressive, then we may alter it in the future to state that the minimum Rust version is fixed for all of regex 1.y.z, and can only be bumped on major regex version releases.

See rust-lang#457

@BurntSushi

@BurntSushi

This commit disables octal syntax by default, which will permit us to produce useful error messages if a user tried to invoke a backreference.

This commit adds a new octal method to RegexBuilder and RegexSetBuilder which permits callers to re-enable octal syntax.

See rust-lang#457

@BurntSushi

This commit removes our explicit implementations of encode_utf8 and replaces them with uses of char::encode_utf8, which was added to the standard library in Rust 1.15.

@BurntSushi

The issue with the ASCII version of \B is that it can match between code units of UTF-8, which means it can cause match indices reported to be on invalid UTF-8 boundaries. Therefore, similar to things like (?-u:\xFF), we ban negated ASCII word boundaries from Unicode regular expressions. Normal ASCII word boundaries remain accessible from Unicode regular expressions.

See rust-lang#457

@BurntSushi

Make sure we can run tests for regex-syntax on Rust 1.20.0.

@BurntSushi

This removes a public From impl that automatically converts errors from the regex-syntax crate to a regex::Error. This actually causes regex-syntax to be a public dependency of regex, which was an oversight. We now remove it, which completely breaks any source code coupling between regex and regex-syntax.

See rust-lang#457

@BurntSushi

This feature is no longer used, instead we rely on runtime CPU feature detection. We kept the feature around as a no-op for backwards compatibility, but no longer need to support it for regex 1.0.

@BurntSushi

This commit adds a new 'use_std' feature and enables it by default. This permits us to one day add support for building regex without 'use_std' (but with 'alloc', probably) by avoiding the introduction of incompatibilities. Namely, this setup ensures that all of today's uses of '--no-default-features' won't compile without also adding the 'use_std' feature.

Closes rust-lang#457

@BurntSushi

1 participant

@BurntSushi