Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard pg_query.go with not windows as well #105

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

anuraaga
Copy link
Contributor

@anuraaga anuraaga commented Dec 5, 2023

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

Copy link
Member

@lfittl lfittl left a comment

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
1 check passed
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