-
Notifications
You must be signed in to change notification settings - Fork 930
Description
Version
1.15.0
What happened?
When trying to debug an endtoend test (e.g. TestReplay) the compiler fails with internal compiler error: NewBulk too big: nbit=22255 count=1028433 nword=696 size=715789368
(of course the numbers vary).
You can also reproduce this by going to directory internal/engine/postgresql
and running go test -c -o /tmp/xx.__debug_bin -gcflags all=-N .
This is a problem in the go compiler (see golang/go#48375) which seems to happen when large slices or maps are generated.
In our case that is https://github.com/kyleconroy/sqlc/blob/main/internal/engine/postgresql/pg_catalog.go which has gotten too big for the compiler since 8fa5272
The suggested workaround is to create the slice outside of the function.
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