Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Fixes #2707

I took a bigger approach than #2708 to fix this issue. The problem was that the Fields method didn't use the same logic as the Pair method. When a template only called Pair but the import code called Fields, we'd get a mismatch.

To fix this, I created a new method called Pairs that uses the same logic as the Pair method. I updated the import code to call this. It also checks if the Arg is a struct and checks the fields.

This code is really brittle and until we do a large refactoring, we will sadly still run into issues.

@kyleconroy kyleconroy merged commit b83f8da into main Sep 7, 2023
@kyleconroy kyleconroy deleted the kyle/refactor-imports-code branch September 7, 2023 17:10
positiveblue added a commit to positiveblue/lnd that referenced this pull request Sep 25, 2023
sqlc has now an official dockerhub organization (sqlc). The old org was
the personal dev account, and new images are not uploaded there anymore.

It looks like they formed a company (Riza, Inc) and are dedicating 100%
of their time to the project (which is great news!)

[sqlc v1.21.0](sqlc-dev/sqlc#2709) has a bug
generating unvalid go code (files with unused imports) so we use v1.20.0
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
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.

Unused imports generated in querier interfaces.

2 participants