You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, Pkl crashes when Regex inputs have some sort of string interpolation or joining (adding strings together) in the constructor. I understand that Apple Pkl Regex input types are based on Java Regex Syntax, but they support combining strings in the format of a + b + c, while Apple Pkl crashes on either occasions.
Problem
This was the function implemented for this case
localfunctiontypeRegex(name: String) Regex = Regex("./src/([A-Za-z]+)/"+ name +".pkl")
And this was the error message received, even without implementing the function (in a variable or item for instance).
An unexpected error has occurred. Would you mind filing a bug report?
Info/Context
Pkl Version (via pkl --version): 0.26.1
The text was updated successfully, but these errors were encountered:
I'm not able to reproduce this on Pkl 0.27.1 (the current release). Given module:
localfunctiontypeRegex(name: String): Regex = Regex("./src/([A-Za-z]+)/"+ name +".pkl")
// ^ note this missing colon from your snippetx = typeRegex("abc").findMatchesIn("./src/abcDEF/abc.pkl").length
y = typeRegex("abc").findMatchesIn("./src/abcDEF/def.pkl").length
As expected, this evaluates to:
x = 1y = 0
Can you try again on the latest release? If you're still seeing issues, can you share a more complete repro?
Overview
Apparently, Pkl crashes when
Regex
inputs have some sort of string interpolation or joining (adding strings together) in the constructor. I understand that Apple PklRegex
input 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.1The text was updated successfully, but these errors were encountered: