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

Port grep to new regex-syntax #853

Closed
ignatenkobrain opened this issue Mar 12, 2018 · 3 comments
Closed

Port grep to new regex-syntax #853

ignatenkobrain opened this issue Mar 12, 2018 · 3 comments
Assignees
Labels
enhancement An enhancement to the functionality of the software.

Comments

@ignatenkobrain
Copy link
Contributor

regex-syntax = "0.4.0"

We can't update regex-syntax in Fedora to 0.5 because of grep holding 0.4. Would be nice if you could fix it. Thanks!

@BurntSushi
Copy link
Owner

BurntSushi commented Mar 12, 2018

Umm. It's on my list of things to do, but I don't understand why this is blocking an update. It sounds like a pretty serious issue, because it means you're blocked on a single programmer's capacity to migrate crates. This isn't just a trivial update either (as intended).

Also, the current release of ripgrep (according to Cargo.lock) should only depend on a single version of regex-syntax.

@ignatenkobrain
Copy link
Contributor Author

@BurntSushi we try to keep only latest version of crates. So we could add second (0.4) and update primary to 0.5, but we try to not do this as hard as possible ;)

@BurntSushi
Copy link
Owner

All righty. I mean, I definitely want to move to the new regex-syntax as quickly as possible since it fixes a few bugs and also lets ripgrep use the new regex features. So it's a priority, at least. :-)

@BurntSushi BurntSushi added the enhancement An enhancement to the functionality of the software. label Mar 13, 2018
@BurntSushi BurntSushi self-assigned this Mar 13, 2018
BurntSushi added a commit that referenced this issue Mar 14, 2018
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 added a commit that referenced this issue Mar 14, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to the functionality of the software.
Projects
None yet
Development

No branches or pull requests

2 participants