Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'std' panics on lowering #4474

Open
2 tasks done
m-span opened this issue May 15, 2024 · 2 comments
Open
2 tasks done

'std' panics on lowering #4474

m-span opened this issue May 15, 2024 · 2 comments
Labels
bug Invalid compiler output or panic

Comments

@m-span
Copy link
Contributor

m-span commented May 15, 2024

What happened?

trying to compile just std leads to program panic

PRQL input

std

SQL output

The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: prqlc/prqlc/src/semantic/lowering.rs:227

Expected SQL output

n/a

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

Interestingly enough, if std is later in a pipeline, it errors out appropriately

Error:
   ╭─[:1:10]
   │
 1 │ from a | std
   │          ─┬─
   │           ╰─── expected a function, but found `std`
───╯
@m-span m-span added the bug Invalid compiler output or panic label May 15, 2024
@m-span
Copy link
Contributor Author

m-span commented May 16, 2024

This feels similar to #4317 - I'm going to see whats up here

@aljazerzen
Copy link
Member

This message should rather say "current implementation of the resolver is half-asses, this should fail earlier, with a better error message".

I'm working on rewriting it all, but I wonder if my new version will cover this case too.

In any case, thanks for the report, this is useful and will be fixed, maybe long time in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Invalid compiler output or panic
Projects
None yet
Development

No branches or pull requests

2 participants