Skip to content

Conversation

Jille
Copy link
Contributor

@Jille Jille commented Jan 21, 2022

The attached test case is broken without the fix and passes with the fix.

…hat copyfrom queries didn't

The attached test case is broken without the fix and passes with the
fix.
@kyleconroy kyleconroy merged commit 2c25c42 into sqlc-dev:main Jan 22, 2022
positiveblue added a commit to positiveblue/sqlc that referenced this pull request May 17, 2022
Depending on the commands used in your `query.sql` the `copyfrom.go`
may end up with unused packge imports.

There is a patch for this problem that was merged in the sqlc-dev#1386 PR.
However, it looks like some edge cases were left out of the fix.

This commit ensures that `buildImports` only has `copyfrom` queries
when called from `copyfromImports`.
kyleconroy pushed a commit that referenced this pull request May 22, 2022
Depending on the commands used in your `query.sql` the `copyfrom.go`
may end up with unused packge imports.

There is a patch for this problem that was merged in the #1386 PR.
However, it looks like some edge cases were left out of the fix.

This commit ensures that `buildImports` only has `copyfrom` queries
when called from `copyfromImports`.
Sign up for free to 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.

2 participants