-
Notifications
You must be signed in to change notification settings - Fork 922
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
Version
1.23.0
What happened?
If I set engine as "bad_engine" in sqlc.yaml engine: "bad_engine"
. When execute sqlc generate
, it will not give me the expected error like unknown engine: bad_engine
as described in internal/compiler/engine.go. instead it panic as below:
sqlc generate
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x440 pc=0x11b6e18]
goroutine 19 [running]:
github.com/sqlc-dev/sqlc/internal/compiler.(*Compiler).Close(0xc000128410?, {0x2904490?, 0xc00034e7d0?})
/home/lessy/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.23.0/internal/compiler/engine.go:89 +0x18
github.com/sqlc-dev/sqlc/internal/cmd.parse({_, _}, {_, _}, {_, _}, {{0x0, 0x0}, {0xc000339bd0, 0xa}, ...}, ...)
/home/lessy/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.23.0/internal/cmd/generate.go:353 +0x658
github.com/sqlc-dev/sqlc/internal/cmd.Generate.func1()
/home/lessy/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.23.0/internal/cmd/generate.go:238 +0x77e
golang.org/x/sync/errgroup.(*Group).Go.func1()
/home/lessy/go/pkg/mod/golang.org/x/sync@v0.4.0/errgroup/errgroup.go:75 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
/home/lessy/go/pkg/mod/golang.org/x/sync@v0.4.0/errgroup/errgroup.go:72 +0x96
Relevant log output
No response
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
No response
What operating system are you using?
No response
What database engines are you using?
No response
What type of code are you generating?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed