Skip to content

cannot debug endtoendtests because of compiler failure #1849

@akutschera

Description

@akutschera

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions