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

upgrade to regex-syntax 0.5, improve --smart-case detection #858

Merged
merged 3 commits into from
Mar 14, 2018

Commits on Mar 14, 2018

  1. grep: upgrade to regex-syntax 0.5

    This update brings with it many bug fixes:
    
      * Better error messages are printed overall. We also include
        explicit call out for unsupported features like backreferences
        and look-around.
      * Regexes like `\s*{` no longer emit incomprehensible errors.
      * Unicode escape sequences, such as `\u{..}` are now supported.
    
    For the most part, this upgrade was done in a straight-forward way. We
    resist the urge to refactor the `grep` crate, in anticipation of it
    being rewritten anyway.
    
    Note that we removed the `--fixed-strings` suggestion whenever a regex
    syntax error occurs. In practice, I've found that it results in a lot of
    false positives, and I believe that its use is not as paramount now that
    regex parse errors are much more readable.
    
    Closes #268, Closes #395, Closes #702, Closes #853
    BurntSushi committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    a12868c View commit details
    Browse the repository at this point in the history
  2. grep: add "perfect" smart case detection

    This commit removes the previous smart case detection logic and replaces
    it with detection based on the regex AST. This particular AST is a faithful
    representation of the concrete syntax, which lets us be very precise in
    how we handle it.
    
    Closes #851
    BurntSushi committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    6d9bc5c View commit details
    Browse the repository at this point in the history
  3. deps: update clap, atty, libc

    Nothing to see here.
    
    Note that we continue to refrain to update tempdir, which means we are
    still bringing in rand 0.4 and rand 0.3. Updating tempdir brings in an
    old version of remove_dir_all, which in turn brings in winapi 0.2. No
    thanks.
    BurntSushi committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    d88ee8f View commit details
    Browse the repository at this point in the history