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

Invalid escape character #50

Closed
GuiAmPm opened this issue Aug 31, 2023 · 3 comments
Closed

Invalid escape character #50

GuiAmPm opened this issue Aug 31, 2023 · 3 comments

Comments

@GuiAmPm
Copy link
Contributor

GuiAmPm commented Aug 31, 2023

Running Bevy 0.11.2 on an ArchLinux x64 is throwing an error when trying to build the following regex:

static RE_COMMENT: once_cell::sync::Lazy<Regex> =
    once_cell::sync::Lazy::new(|| Regex::new(r"(\/\/|\/\*|\*\/)").unwrap());

Shouldn't it be r"(//|/\*|\*/)" ?

@mockersf
Copy link
Member

mockersf commented Sep 1, 2023

Could you try deleting your lockfile and updating?

@robtfm
Copy link
Collaborator

robtfm commented Sep 1, 2023

seems like allowing no-op escapes was added in regex 1.8.0, so cargo update or deleting cargo.lock should work.

we should also change the regex or bump the required version though. i think changing the regex is better.

i'm not sure it's worth making another 0.8.x release, since the fix is quite straight forward, but we could do that too if there's a need.

@GuiAmPm
Copy link
Contributor Author

GuiAmPm commented Sep 4, 2023

@robtfm @mockersf
Removing the lock file does work. Haven't really try cargo update, but would probably have the same effect.
At same time I've made the PR to change the Regex.

Thanks for the help!

@GuiAmPm GuiAmPm closed this as completed Sep 4, 2023
robtfm pushed a commit that referenced this issue Sep 5, 2023
This just removes the unnecessary / invalid escapes.

Addresses #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants