Skip to content

Commit

Permalink
build(deps): bump wazero from 1.5.0 to 1.7.0 (#3284)
Browse files Browse the repository at this point in the history
* build(deps): bump wazero from 1.5.0 to 1.7.0

* build(deps): bump pg_query_go from v4 to v5

* Upgrade to v5
  • Loading branch information
kyleconroy committed Mar 20, 2024
1 parent 019c13d commit c870a71
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 34 deletions.
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ require (
github.com/jackc/pgx/v5 v5.5.5
github.com/jinzhu/inflection v1.0.0
github.com/lib/pq v1.10.9
github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73
github.com/pganalyze/pg_query_go/v5 v5.1.0
github.com/pingcap/tidb/pkg/parser v0.0.0-20231103154709-4f00ece106b1
github.com/riza-io/grpc-go v0.2.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/tetratelabs/wazero v1.6.0
github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99
github.com/tetratelabs/wazero v1.7.0
github.com/wasilibs/go-pgquery v0.0.0-20240319230125-b9b2e95c69a7
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/sync v0.6.0
google.golang.org/grpc v1.62.1
Expand Down Expand Up @@ -53,7 +53,6 @@ require (
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.uber.org/atomic v1.11.0 // indirect
Expand Down
14 changes: 6 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73 h1:vZEujakYrBzd7CWMwqTsDRU7bdRm4Aiu76X9K3P+qtI=
github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73/go.mod h1:pRJ9rCcWIhDLAzymhH2iY5kEVEfU6UGrL1wBWuO7gmM=
github.com/pganalyze/pg_query_go/v5 v5.1.0 h1:MlxQqHZnvA3cbRQYyIrjxEjzo560P6MyTgtlaf3pmXg=
github.com/pganalyze/pg_query_go/v5 v5.1.0/go.mod h1:FsglvxidZsVN+Ltw3Ai6nTgPVcK2BPukH3jCDEqc1Ug=
github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 h1:+FZIDR/D97YOPik4N4lPDaUcLDF/EQPogxtlHB2ZZRM=
Expand Down Expand Up @@ -178,12 +178,10 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g=
github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A=
github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99 h1:HFee1ByN4FrqNVd53Mo28ccGO+g5gxqUV/gdvKMe4b8=
github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99/go.mod h1:f2JMhFocVxY3VKMd9ykUxMnX4EVew9WOgjnfaNBB6C8=
github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531 h1:zVJ4SZgaEE9sEH2L9k1+eAvCNa/WAAnT9UiMa3/tQrI=
github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531/go.mod h1:IQNVyA4d1hWIe23mlMMuqXjyWMdndgSlNx6FqBkwPsM=
github.com/tetratelabs/wazero v1.7.0 h1:jg5qPydno59wqjpGrHph81lbtHzTrWzwwtD4cD88+hQ=
github.com/tetratelabs/wazero v1.7.0/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/wasilibs/go-pgquery v0.0.0-20240319230125-b9b2e95c69a7 h1:sqqLVb63En4uTKFKBWSJ7c1aIFonhM1yn35/+KchOf4=
github.com/wasilibs/go-pgquery v0.0.0-20240319230125-b9b2e95c69a7/go.mod h1:ZAUjWnxivykc22k0TKFZylOV0WlVQ9nWMExfGFIBuF4=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
Expand Down
15 changes: 2 additions & 13 deletions internal/engine/postgresql/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package postgresql
import (
"fmt"

pg "github.com/pganalyze/pg_query_go/v4"
pg "github.com/pganalyze/pg_query_go/v5"

"github.com/sqlc-dev/sqlc/internal/sql/ast"
)
Expand Down Expand Up @@ -183,7 +183,6 @@ func convertAggref(n *pg.Aggref) *ast.Aggref {
Aggtype: ast.Oid(n.Aggtype),
Aggcollid: ast.Oid(n.Aggcollid),
Inputcollid: ast.Oid(n.Inputcollid),
Aggtranstype: ast.Oid(n.Aggtranstype),
Aggargtypes: convertSlice(n.Aggargtypes),
Aggdirectargs: convertSlice(n.Aggdirectargs),
Args: convertSlice(n.Args),
Expand Down Expand Up @@ -1663,7 +1662,6 @@ func convertGrantRoleStmt(n *pg.GrantRoleStmt) *ast.GrantRoleStmt {
GrantedRoles: convertSlice(n.GrantedRoles),
GranteeRoles: convertSlice(n.GranteeRoles),
IsGrant: n.IsGrant,
AdminOpt: n.AdminOpt,
Grantor: convertRoleSpec(n.Grantor),
Behavior: ast.DropBehavior(n.Behavior),
}
Expand Down Expand Up @@ -1693,7 +1691,6 @@ func convertGroupingFunc(n *pg.GroupingFunc) *ast.GroupingFunc {
Xpr: convertNode(n.Xpr),
Args: convertSlice(n.Args),
Refs: convertSlice(n.Refs),
Cols: convertSlice(n.Cols),
Agglevelsup: ast.Index(n.Agglevelsup),
Location: int(n.Location),
}
Expand Down Expand Up @@ -1754,7 +1751,6 @@ func convertIndexStmt(n *pg.IndexStmt) *ast.IndexStmt {
ExcludeOpNames: convertSlice(n.ExcludeOpNames),
Idxcomment: makeString(n.Idxcomment),
IndexOid: ast.Oid(n.IndexOid),
OldNode: ast.Oid(n.OldNode),
Unique: n.Unique,
Primary: n.Primary,
Isconstraint: n.Isconstraint,
Expand Down Expand Up @@ -2016,7 +2012,6 @@ func convertOpExpr(n *pg.OpExpr) *ast.OpExpr {
return &ast.OpExpr{
Xpr: convertNode(n.Xpr),
Opno: ast.Oid(n.Opno),
Opfuncid: ast.Oid(n.Opfuncid),
Opresulttype: ast.Oid(n.Opresulttype),
Opretset: n.Opretset,
Opcollid: ast.Oid(n.Opcollid),
Expand Down Expand Up @@ -2108,7 +2103,7 @@ func convertPartitionSpec(n *pg.PartitionSpec) *ast.PartitionSpec {
return nil
}
return &ast.PartitionSpec{
Strategy: makeString(n.Strategy),
Strategy: makeString(n.Strategy.String()),
PartParams: convertSlice(n.PartParams),
Location: int(n.Location),
}
Expand Down Expand Up @@ -2266,11 +2261,6 @@ func convertRangeTblEntry(n *pg.RangeTblEntry) *ast.RangeTblEntry {
Lateral: n.Lateral,
Inh: n.Inh,
InFromCl: n.InFromCl,
RequiredPerms: ast.AclMode(n.RequiredPerms),
CheckAsUser: ast.Oid(n.CheckAsUser),
SelectedCols: makeUint32Slice(n.SelectedCols),
InsertedCols: makeUint32Slice(n.InsertedCols),
UpdatedCols: makeUint32Slice(n.UpdatedCols),
SecurityQuals: convertSlice(n.SecurityQuals),
}
}
Expand Down Expand Up @@ -2498,7 +2488,6 @@ func convertScalarArrayOpExpr(n *pg.ScalarArrayOpExpr) *ast.ScalarArrayOpExpr {
return &ast.ScalarArrayOpExpr{
Xpr: convertNode(n.Xpr),
Opno: ast.Oid(n.Opno),
Opfuncid: ast.Oid(n.Opfuncid),
UseOr: n.UseOr,
Inputcollid: ast.Oid(n.Inputcollid),
Args: convertSlice(n.Args),
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/postgresql/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"strings"

nodes "github.com/pganalyze/pg_query_go/v4"
nodes "github.com/pganalyze/pg_query_go/v5"

"github.com/sqlc-dev/sqlc/internal/engine/postgresql/parser"
"github.com/sqlc-dev/sqlc/internal/source"
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/postgresql/parse_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package postgresql

import (
nodes "github.com/pganalyze/pg_query_go/v4"
nodes "github.com/pganalyze/pg_query_go/v5"
)

var Parse = nodes.Parse
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/postgresql/parser/parser_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

package parser

import "github.com/pganalyze/pg_query_go/v4/parser"
import "github.com/pganalyze/pg_query_go/v5/parser"

type Error = parser.Error
2 changes: 1 addition & 1 deletion internal/engine/postgresql/utils.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package postgresql

import (
nodes "github.com/pganalyze/pg_query_go/v4"
nodes "github.com/pganalyze/pg_query_go/v5"
)

func isArray(n *nodes.TypeName) bool {
Expand Down
1 change: 0 additions & 1 deletion internal/sql/ast/aggref.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ type Aggref struct {
Aggtype Oid
Aggcollid Oid
Inputcollid Oid
Aggtranstype Oid
Aggargtypes *List
Aggdirectargs *List
Args *List
Expand Down
1 change: 0 additions & 1 deletion internal/sql/ast/grant_role_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ type GrantRoleStmt struct {
GrantedRoles *List
GranteeRoles *List
IsGrant bool
AdminOpt bool
Grantor *RoleSpec
Behavior DropBehavior
}
Expand Down
1 change: 0 additions & 1 deletion internal/sql/ast/index_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type IndexStmt struct {
ExcludeOpNames *List
Idxcomment *string
IndexOid Oid
OldNode Oid
Unique bool
Primary bool
Isconstraint bool
Expand Down
1 change: 0 additions & 1 deletion internal/sql/ast/op_expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package ast
type OpExpr struct {
Xpr Node
Opno Oid
Opfuncid Oid
Opresulttype Oid
Opretset bool
Opcollid Oid
Expand Down
1 change: 0 additions & 1 deletion internal/sql/ast/scalar_array_op_expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package ast
type ScalarArrayOpExpr struct {
Xpr Node
Opno Oid
Opfuncid Oid
UseOr bool
Inputcollid Oid
Args *List
Expand Down

0 comments on commit c870a71

Please sign in to comment.