prql icon indicating copy to clipboard operation
prql copied to clipboard

tracking: compiler panic

Open aljazerzen opened this issue 2 years ago • 1 comments

This is a tracking issue of all pancics that occur during compilation.

Most .unwraps and unimplemented!s have been introduced with with semantic branch and 0.3 where I was too lazy to gracefully handle many corner cases. Many of these cases are also actual unimplemented features, so the real fix is to do the features.

So let's link any future issues with examples that panic to here, so they can be converted into tests when we come around to fix them all.

aljazerzen avatar Jan 04 '23 09:01 aljazerzen

Ref #1334

aljazerzen avatar Jan 04 '23 09:01 aljazerzen

Edit: this is now fixed


Here's a panic, which should error because of the function call without parentheses:

from employees
derive foo = round 1+1 bar

max-sixty avatar Jan 11 '23 20:01 max-sixty

@aljazerzen could this be a Good First Issue? I'm thinking that given an example, folks can find the panic fairly easily, and change it from .unwrap to an Error?

max-sixty avatar Jan 21 '23 20:01 max-sixty

Yeah maybe. Sometimes it can be an actual programmer error.

aljazerzen avatar Jan 21 '23 21:01 aljazerzen

OK — I've added the label.

But for anyone seeing this — as @aljazerzen, there's some possibility that the errors are deeper (but that should be fairly clear very early). Feel free to post any questions at all!

max-sixty avatar Jan 22 '23 01:01 max-sixty

I don't see any outstanding issues — maybe there were fewer than we thought? Or maybe we haven't found them yet...

max-sixty avatar Jun 19 '23 22:06 max-sixty

Apparently yes. I expected more of them, but it turns out that my .unwrap()s were justified :D

aljazerzen avatar Jun 20 '23 06:06 aljazerzen