bevyengine/naga_oil

Invalid escape character

GuiAmPm opened this issue · 3 comments

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"(//|/\*|\*/)" ?

Could you try deleting your lockfile and updating?

robtfm commented

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.

@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!