com-lihaoyi / fastparse

Writing Fast Parsers Fast in Scala
https://com-lihaoyi.github.io/fastparse
MIT License
1.09k stars 164 forks source link

scala3 tracing failing to detect name of method #284

Closed caoilte closed 2 months ago

caoilte commented 1 year ago

Mostly everything is fine in scala3 but I'm struggling to make trace for me. instead of printing the function name where the error occurred it always prints something like ParserGrammar$$$Lambda$122/0x0000000800d4b920@cad498c):1:3 where ParserGrammar is an object and the parser is a standard def within the object.

It does seem to work on built in parsers okay (eg end-of-input)

Possibly the problem is related to CharPred and the function (Char => Boolean) I am passing it always being traced as an unhelpful anonymous lambda. It may not even be a scala 3 thing.

lihaoyi commented 1 year ago

@caoilte please provide a code sample that reproduces the issue