-
Notifications
You must be signed in to change notification settings - Fork 843
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
Use wazero-based libpgquery wrapper in currently disabled environments #3027
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0bee534
Use wazero-based wrapper of libpgquery when cgo is disabled or on win…
anuraaga f7c2c9c
Fix
anuraaga bae1e3c
Fix
anuraaga f223341
Typo
anuraaga 4009fa4
cgo guard for TestReplay
anuraaga 315cb5a
Windows no test
anuraaga 767e168
Use upstream nodes type
anuraaga a608c49
Update to latest pg_query_go
anuraaga ce0fa99
Test matrix
anuraaga 61e9a97
Tweak workflow
anuraaga d12d574
Fix workflow
anuraaga e0af7a9
Tweak job name
anuraaga 2d8bb69
Fix tests for nocgo / windows
anuraaga 80881e7
Parallel
anuraaga 03709bb
Clean
anuraaga 918bcba
Fix test
anuraaga 720d2f9
Use windows line ending in test
anuraaga c2d0f1d
Fix
anuraaga 64078d7
Try more
anuraaga 1ee3272
Ignore e2e on win
anuraaga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//go:build examples | ||
// +build examples | ||
//go:build examples && cgo | ||
// +build examples,cgo | ||
|
||
package authors | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//go:build examples | ||
// +build examples | ||
//go:build examples && cgo | ||
// +build examples,cgo | ||
|
||
package booktest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//go:build examples | ||
// +build examples | ||
//go:build examples && cgo | ||
// +build examples,cgo | ||
|
||
package ondeck | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
//go:build !windows && cgo | ||
// +build !windows,cgo | ||
|
||
package postgresql | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build !windows && cgo | ||
// +build !windows,cgo | ||
|
||
package postgresql | ||
|
||
import ( | ||
nodes "github.com/pganalyze/pg_query_go/v4" | ||
) | ||
|
||
var Parse = nodes.Parse | ||
var Fingerprint = nodes.Fingerprint |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build windows || !cgo | ||
// +build windows !cgo | ||
|
||
package postgresql | ||
|
||
import ( | ||
nodes "github.com/wasilibs/go-pgquery" | ||
) | ||
|
||
var Parse = nodes.Parse | ||
var Fingerprint = nodes.Fingerprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//go:build !windows && cgo | ||
// +build !windows,cgo | ||
|
||
package parser | ||
|
||
import "github.com/pganalyze/pg_query_go/v4/parser" | ||
|
||
type Error = parser.Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//go:build windows || !cgo | ||
// +build windows !cgo | ||
|
||
package parser | ||
|
||
import "github.com/wasilibs/go-pgquery/parser" | ||
|
||
type Error = parser.Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
//go:build !windows && cgo | ||
// +build !windows,cgo | ||
|
||
package postgresql | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ func Glob(patterns []string) ([]string, error) { | |
files = append(files, filepath.Join(path, f.Name())) | ||
} | ||
} else { | ||
files = append(files, path) | ||
files = append(files, filepath.Clean(path)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The result of |
||
} | ||
} | ||
var sqlFiles []string | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a few things to normalize line endings in the test but ended up giving up since there were some non-trivial issues still