Skip to content

Guard pg_query.go with not windows as well - #105

Merged
lfittl merged 1 commit into
pganalyze:mainfrom
anuraaga:nowindows
Dec 5, 2023
Merged

lfittl merged 1 commit into
pganalyze:mainfrom
anuraaga:nowindows

Conversation

@anuraaga

@anuraaga anuraaga commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

This is a followup to #102, in sqlc-dev/sqlc#3027 we are trying to allow sqlc to run on windows using the wasm pgquery, even when cgo is enabled (this would allow windows to support both postgresql engine and wasmtime plugins). So it turned out we need to guard the cgo build from this repository against windows as well since it otherwise tries to compile and fail as we found in https://github.com/sqlc-dev/sqlc/pull/3035/files

I didn't add to the test files like before since it didn't seem necessary but let me know

/cc @kyleconroy

@lfittl lfittl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I think that works until we add Windows support.

That said, be aware that this may cause a compatibility break if you solely rely on this to decide whether pg_query's internal logic is used (i.e. make sure that you don't break if this check suddenly goes away when we add Windows support directly).

@lfittl
lfittl merged commit 7463430 into pganalyze:main Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants