Skip to content

release regex 1.0 (May 1, 2018) #457

Closed
@BurntSushi

Description

@BurntSushi

I think the 0.2 release has baked long enough. I propose that regex 1.0 be released on May 1, 2018.

Here are the key breaking changes (all supremely minor) I'd like to make:

  • Increase the minimum Rust version to 1.??.
  • Establish a policy around bumping the minimum Rust version. I would like to propose that new patch releases (1.x.y) should never increase the minimum Rust version required to compile regex, but that new minor version releases (1.x) may increase the minimum Rust version required to compile regex.
  • Disable octal syntax by default. Today, Regex::new(r"\1").unwrap().is_match("\u{1}") evaluates to true. Instead, I'd like it to emit an error that backreferences are not supported. We will provide a method on RegexBuilder to opt into the old syntax with octal escape sequences supported.
  • Ban (?-u:\B) from use in Regex::new, since it is permitted to match invalid UTF-8 boundaries. We, of course, continue to allow it for bytes::Regex::new. (?-u:\b) remains legal in Regex::new, since it cannot match invalid UTF-8 boundaries.
  • Remove the impl From<regex_syntax::Error> for regex::Error definition. The fact that this exists was an oversight, and it actually causes regex-syntax to be a public dependency of regex, which we very much do not want to happen.
  • As noted by @cuviper, we may some day want to support non-std but core/alloc-only use cases. To make this happen, we'll need to gate things on a std feature that is enabled by default. We need to add this feature in 1.0 and gate the entire crate on it. If we didn't, and added this gate in the future, then existing uses of default-features = false would likely break, which would be a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions