-
Notifications
You must be signed in to change notification settings - Fork 218
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
Allow no main pipeline? #1803
Comments
This would be useful for: and if the language were to be extended to also be a Data Manipulation Language (DML), Data Definition Language (DDL), and/or Data Control Language (DCL). |
I think it's desirable to permit this. Another manifestation is with the first bullet in #1728. It's thinkable that a "no-query" input should generate an empty output from the PRQL compiler that indicates "no pipeline" |
As discussed in #1825 — I think we should be able to parse these queries, but not compile them.
...but somewhere the VSCode extension is raising an error. So possibly this is an issue with that? It shouldn't be trying to compile every PRQL file... I'll open an issue there |
PRQL vscode extension only uses compile and shows any errors that produces. Nothing has changed there since v0.4.2 when I took over. Also, should not compile parse PRQL first and generate errors for invalid PRQL before even trying to compile it, and not create error messages when PRQ is valid, or prqlCode is an empty string? More at: PRQL/prql-vscode#128 (comment) |
That looks like some kind of AST of PRQL code. Do you think PRQL extension should display it in Outline instead as other code editors do? PRQL document outline is empty in vscode ext. v0.6.0. That is where PRQL parse/statements tree display should be added, which would be a new feature request, in addition to prql compiler not produce errors when there are not any. |
Lots of stuff here & the related issues which I'll aim to go through later. Just to confirm one thing:
Totally, this is definitely something that's been there for ages, not on you at all! (and even if it were, these issues are to be expected) |
yeah, it is an issue we need to resolve, even for empty prql documents. I noticed that error too when I was prepping ext. v0.6 release. I propose we consider adding info and warning messages to the compiler, not just errors. Then display them in the Problems panel in vscode, and we can display them in Preview if there is no other output generated. That would make it consistent for all the compiler api clients too, and use the standard nomenclature of error, warn, info messages display most compilers and linters use. We should consider showing parsed PRQL AST in vscode Outline, but that's a much larger effort we can discuss separately. |
I very much like this idea! |
The immediate question is subsumed by #2129, and I think we have a very viable path forward. PRQL/prql-vscode#128 remains, but we can continue on that issue |
Opening the
std.prql
file in VSCode returns an errormissing main pipeline
. It's possible to replicate with:Should we allow files with no queries? This will become more important when we want to allow importing items from other files.
The text was updated successfully, but these errors were encountered: