-
Notifications
You must be signed in to change notification settings - Fork 929
sqlc generate error
#1091
-
Hello all,
After I ran 'sqlc generate' it seems like I get this following errors. What might be a potential mistake? Thanks in advance.
sqlc generate
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x4900708]
goroutine 1 [running]:
github.com/kyleconroy/sqlc/internal/compiler.resolveCatalogRefs(0xc0004b0cb0, 0xc00082a0e8, 0x1, 0x1, 0xc000bef3b0, 0x3, 0x3, 0xc000bdf5f0, 0x0, 0xc00051cd30, ...)
github.com/kyleconroy/sqlc/internal/compiler/resolve.go:301 +0x16c8
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQuery(0xc0003d4800, 0x4e7e120, 0xc000471fa0, 0xc0001d2380, 0x79, 0x0, 0x0, 0x0, 0x3)
github.com/kyleconroy/sqlc/internal/compiler/parse.go:90 +0x565
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQueries(0xc0003d4800, 0x5000000, 0xc0004b0cb0, 0xc00082d550, 0x1)
github.com/kyleconroy/sqlc/internal/compiler/compile.go:109 +0x599
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).ParseQueries(...)
github.com/kyleconroy/sqlc/internal/compiler/engine.go:49
github.com/kyleconroy/sqlc/internal/cmd.parse(0xc0000eb600, 0xc00081f4dc, 0x2, 0xc000048044, 0x2d, 0xc00081f526, 0xa, 0xc00082d550, 0x1, 0x1, ...)
github.com/kyleconroy/sqlc/internal/cmd/generate.go:223 +0x145
github.com/kyleconroy/sqlc/internal/cmd.Generate(0x59f7200, 0xc000048044, 0x2d, 0x0, 0x0, 0x4e826a0, 0xc000010020, 0x0, 0x4c315fc, 0x32)
github.com/kyleconroy/sqlc/internal/cmd/generate.go:167 +0xce9
github.com/kyleconroy/sqlc/internal/cmd.glob..func3(0x59f7220, 0x5a65438, 0x0, 0x0)
github.com/kyleconroy/sqlc/internal/cmd/cmd.go:120 +0x17d
github.com/spf13/cobra.(*Command).execute(0x59f7220, 0x5a65438, 0x0, 0x0, 0x59f7220, 0x5a65438)
github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004d7900, 0xc0000ebf10, 0x1, 0x1)
github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.1.3/command.go:897
github.com/kyleconroy/sqlc/internal/cmd.Do(0xc00003c050, 0x1, 0x1, 0x4e82660, 0xc000010010, 0x4e826a0, 0xc000010018, 0x4e826a0, 0xc000010020, 0xc0000a8058)
github.com/kyleconroy/sqlc/internal/cmd/cmd.go:34 +0x317
main.main()
github.com/kyleconroy/sqlc/cmd/sqlc/main.go:10 +0xb5
make: *** [sqlc] Error 2
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
mannerism
Jul 18, 2021
Terrible mistake in my side just a field name typo.
Replies: 1 comment
-
Terrible mistake in my side just a field name typo.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Answer selected by
mannerism
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment