Skip to content

pg_query_go dependency broken on macOS Ventura, apparent need to rewrite to 2.2.0 #18

@samiam2013

Description

@samiam2013

I'm using macOS ventura on a large go codebase that could benefit from the error checking this wonderful tool provides. Linux still works but on my mac I get this obscure error:

In file included from gram.y:46:
In file included from ../../../go/pkg/mod/github.com/pganalyze/pg_query_go@v1.0.3/parser/include/postgres.h:47:
In file included from ../../../go/pkg/mod/github.com/pganalyze/pg_query_go@v1.0.3/parser/include/c.h:1224:
In file included from ../../../go/pkg/mod/github.com/pganalyze/pg_query_go@v1.0.3/parser/include/port.h:17:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from
[...] 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:567:11: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_4'

this was experienced by the sqlc maintainers sqlc-dev/sqlc#1921 and at the time a workaround was found reloading xcode tools but since then that has stopped working or I'm unable to do it right, either way I discovered from this issue that I need pg_query_go/v2, specifically 2.2.0, a major version change.

I've only spent a couple hours blindly changing stuff to get to a buildable state, and now I'm having trouble debugging because the node interface that vet relies deeply on is now hidden in package internals. I don't think I can write an interface for the type reflection switching to stay in place, I'm pretty sure I would have to make method calls with nil checks instead, unfortunate because I can't do assignments in switch cases, but just more time investment, time I don't want to spend duplicating other's efforts. especially since I'm now also finding I have to fix my debugger x.x

Does anyone else have any insight into this bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions