Skip to content

Conversation

dominikbraun
Copy link
Contributor

At the moment (without PR #178), this config file causes sqlc to panic:

{
  "version": "1",
  "packages": [
    {
      "name": "db",
      "emit_json_tags": true,
      "emit_prepared_queries": false,
      "path": "db",
      "queries": "db.sql",
      "schema": "db.sql"
    }
  ]
}

sqlc can't handle the situation where the queries value is equal to the schema value.

While #178 fixes the panic from a technical point of view and prevents sqlc from panicking in other situations, this PR checks if the paths are the same and informs the user if necessary.

@kyleconroy
Copy link
Collaborator

See #180 for an alternative to this change

@dominikbraun
Copy link
Contributor Author

dominikbraun commented Dec 16, 2019

I'd prefer #180 since it allows the same path/file.

@kyleconroy
Copy link
Collaborator

Great, closing this in favor of merging #180

@kyleconroy kyleconroy closed this Dec 16, 2019
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