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 regular expression #238

Open
jtojnar opened this issue Sep 23, 2022 · 7 comments
Open

Invalid regular expression #238

jtojnar opened this issue Sep 23, 2022 · 7 comments
Milestone

Comments

@jtojnar
Copy link

jtojnar commented Sep 23, 2022

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

@arteymix
Copy link
Member

I'll try to take a look this week. The regex pretty mundane though.

@yerodin
Copy link

yerodin commented Nov 22, 2022

Does /(?:\.?[\w\s\/@+~])+/ accomplish the same thing?

@arteymix
Copy link
Member

arteymix commented Nov 22, 2022

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

@yerodin
Copy link

yerodin commented Nov 22, 2022

Ahh I see, seems to be working well so far :)

@arteymix
Copy link
Member

@yerodin Would you like to submit a PR with the fix?

@arteymix arteymix modified the milestones: 0.3.19, 0.4.0 Nov 22, 2022
@yerodin
Copy link

yerodin commented Nov 22, 2022

Sure! I'd be honored, let me just skim through the guide real quick

yerodin pushed a commit to yerodin/valum that referenced this issue Nov 22, 2022
@yerodin
Copy link

yerodin commented Nov 22, 2022

All good

arteymix added a commit that referenced this issue Nov 23, 2022
#238 Convert path regex to PRCE2
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