prql icon indicating copy to clipboard operation
prql copied to clipboard

internal: upgrade chumsky to 0.10 in lexer

Open max-sixty opened this issue 7 months ago • 1 comments
trafficstars

chumsky 0.10 is a total rewrite from 0.9, and much of our code also needs rewriting if we're to upgrade

this creates a feature that uses chumsky 0.10 only for the lexer, as a way of making progress. claude code helped a lot, which benefits from smaller problems.

before merging, we would keep only the chumsky 0.10 code for the lexer (and possibly upgrade the parser, I'm not sure)

so far, it mostly works; only a couple of failing tests. I'm not sure how to get our "any number of odd quotes" lexing correctly, and there's a small issue with the end of input. I'll ask about the first over at chumsky

(this isn't the most important thing for PRQL, but I'm trying to get back into it, and wanted to spend some time trying a moderately difficult project with LLMs, so this seemed like a reasonable case. though also I thought it would be much easier! very open to feedback on whether there's a way to more incrementally make the changes, rather than basically rewriting from scratch. chumsky's type errors don't make it easy to play whack-a-mole)

max-sixty avatar Apr 02 '25 17:04 max-sixty

@zesterer thank you very much for your review! greatly appreciated

max-sixty avatar Apr 02 '25 21:04 max-sixty

Any update on this?

vanillajonathan avatar Jul 01 '25 23:07 vanillajonathan

Any update on this?

I found it really hard and got distracted by other things. I'd like to come back to it at some point; possibly when there are more docs for me & the LLMs to benefit from...

max-sixty avatar Jul 02 '25 02:07 max-sixty