Skip to content

Conversation

@andrewmbenton
Copy link
Collaborator

This allows users to run generate on any parsable query, even when sqlc doesn't understand it.

Closes#2377

…odes This allows users to run generate on any parseable query, even when sqlc doesn't understand it. Closes#2377
@andrewmbenton
Copy link
CollaboratorAuthor

I think we need to think this through a little more. The vet_failures test adjustment hints at the fact that we are now adding queries to the compiler result (and codegenrequest) that we weren't previously, because they were "unsupported". We are doing this even though the queries don't have any annotation, which is perhaps unexpected.

@kyleconroy
Copy link
Collaborator

We are doing this even though the queries don't have any annotation, which is perhaps unexpected.

I do think this is an unexpected behavior change. What do you think about ignoring queries that don't have an annotation? I think that feels like the expected behavior.

@andrewmbenton
Copy link
CollaboratorAuthor

What do you think about ignoring queries that don't have an annotation? I think that feels like the expected behavior.

Yeah I had implemented that initially, and I think it's correct. It will change a decent amount of test output though so I would do it in a separate PR.

I could also argue that this isn't that big of a change, since we must have been adding un-annotated queries to codegen requests all along, but only if they were "supported."

@andrewmbentonandrewmbenton marked this pull request as ready for review December 20, 2023 00:01
@andrewmbentonandrewmbenton merged commit 55f3250 into mainDec 20, 2023
@andrewmbentonandrewmbenton deleted the andrew/permissive-exec branch December 20, 2023 00:10
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
…odes (sqlc-dev#3069) This allows users to run generate on any parseable query, even when sqlc doesn't understand it. Closessqlc-dev#2377
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@andrewmbenton@kyleconroy