valum
valum copied to clipboard
Invalid regular expression
Building Valum on Nix with GNOME 43 fails:
../src/valum/valum-router.vala:50.30-50.49: error: Invalid regular expression `//(?:\.?[\w-\s\/@+~])+'.
50 | register_type ("path", /(?:\.?[\w-\s\/@+~])+/);
| ^~~~~~~~~~~~~~~~~~~~
Likely due to GLib switching to PCRE 2: https://gitlab.gnome.org/GNOME/glib/-/issues/2706
I'll try to take a look this week. The regex pretty mundane though.
Does /(?:\.?[\w\s\/@+~])+/
accomplish the same thing?
@yerodin It's lacking hyphens in the path-like characters. Maybe the solution is to escape the hyphen?
Something like /(?:\.?[\w\-\s\/@+~])+/
. I'm so sorry I don't have the time to test this right now.
Ahh I see, seems to be working well so far :)
@yerodin Would you like to submit a PR with the fix?
Sure! I'd be honored, let me just skim through the guide real quick
All good