mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Regex String interpolation fails (silently) #260
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nikeokoronkwo on GitHub (Dec 23, 2024).
Overview
Apparently, Pkl crashes when
Regexinputs have some sort of string interpolation or joining (adding strings together) in the constructor. I understand that Apple PklRegexinput types are based on Java Regex Syntax, but they support combining strings in the format ofa + b + c, while Apple Pkl crashes on either occasions.Problem
This was the function implemented for this case
And this was the error message received, even without implementing the function (in a variable or item for instance).
Info/Context
pkl --version): 0.26.1@HT154 commented on GitHub (Dec 23, 2024):
I'm not able to reproduce this on Pkl 0.27.1 (the current release). Given module:
As expected, this evaluates to:
Can you try again on the latest release? If you're still seeing issues, can you share a more complete repro?
@nikeokoronkwo commented on GitHub (Dec 23, 2024):
Oh, my bad. Must've been the colon
Sorry about that
@odenix commented on GitHub (Dec 24, 2024):
The "unexpected error" message is clearly a bug (possibly fixed by https://github.com/apple/pkl/pull/837).
@bioball commented on GitHub (Jan 17, 2025):
I haven't been able to reproduce this; closing this. Please comment if you are still seeing this.