Skip to content

sqlc generate should emit a warning when using an unknown sql_package #3104

Closed
@devonhk

Description

@devonhk

What do you want to change?

I had a typo in my sqlc.json file:

{
  "version": "2",
  "sql": [{
    "schema": "schema/schema.sql",
    "queries": "queries.sql",
    "engine": "postgresql",
    "gen": {
      "go": {
        "out": "db",
        "sql_package": "pgx/5"
      }
    }
  }]
}

When I ran sqlc generate it happily generated code without any warnings.

I think the dev experience could be improved with a warning message along the lines of:
sql_package: pgx/5 is unknown. Defaulting to database/sql codegen...

What database engines need to be changed?

No response

What programming language backends need to be changed?

Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions