Skip to content

Commit

Permalink
go.mod: update to grpc-gateway v2
Browse files Browse the repository at this point in the history
This commit takes the changes from #9
and applies them as a patch on top of new snapshots until we
resolve the dependency issues.
  • Loading branch information
Jeremyyang920 committed Feb 13, 2024
1 parent 4168c29 commit a6d7390
Show file tree
Hide file tree
Showing 10 changed files with 389 additions and 105 deletions.
20 changes: 11 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ require (
github.com/dustin/go-humanize v1.0.0
github.com/gogo/protobuf v1.3.2
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551
github.com/google/go-cmp v0.5.8
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/google/go-cmp v0.6.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1
github.com/lib/pq v1.10.6
github.com/pierrre/geohash v1.0.0
github.com/sasha-s/go-deadlock v0.3.1
Expand All @@ -34,17 +34,19 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/getsentry/sentry-go v0.12.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/twpayne/go-kml v1.5.2 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sys v0.15.0 // indirect
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84 // indirect
google.golang.org/grpc v1.40.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
59 changes: 24 additions & 35 deletions go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
diff --git a/pkg/sql/sem/tree/type_name.go b/pkg/sql/sem/tree/type_name.go
index 898009a..5d4423a 100644
index a671b41..51e484b 100644
--- a/pkg/sql/sem/tree/type_name.go
+++ b/pkg/sql/sem/tree/type_name.go
@@ -56,8 +56,7 @@ func (t *TypeName) String() string {

@@ -48,7 +48,7 @@ func (t *TypeName) Format(ctx *FmtCtx) {
// SQLString implements the ResolvableTypeReference interface.
func (t *TypeName) SQLString() string {
- // FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
// FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
- return AsStringWithFlags(t, FmtBareIdentifiers)
+ return AsStringWithFlags(t, FmtSimple)
}

// FQString renders the type name in full, not omitting the prefix
@@ -250,14 +249,12 @@ func (node *ArrayTypeReference) Format(ctx *FmtCtx) {

func (t *TypeName) objectName() {}
@@ -240,13 +240,13 @@ func (node *ArrayTypeReference) Format(ctx *FmtCtx) {
// SQLString implements the ResolvableTypeReference interface.
func (node *ArrayTypeReference) SQLString() string {
- // FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
// FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
- return AsStringWithFlags(node, FmtBareIdentifiers)
+ return AsStringWithFlags(node, FmtSimple)
}

// SQLString implements the ResolvableTypeReference interface.
func (name *UnresolvedObjectName) SQLString() string {
- // FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
// FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
- return AsStringWithFlags(name, FmtBareIdentifiers)
+ return AsStringWithFlags(name, FmtSimple)
}
Expand Down
25 changes: 12 additions & 13 deletions patches/0004-fix-bazel-compl.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
From d300afb062569278ff9e770b4f7e0ed0d84f6f82 Mon Sep 17 00:00:00 2001
From: Oliver Tan <otan@cockroachlabs.com>
Date: Mon, 15 May 2023 14:21:32 +1000
From fd8c124e5968547a82fecc92e6081fdd71a4b49a Mon Sep 17 00:00:00 2001
From: Jeremy Yang <jyang@cockroachlabs.com>
Date: Tue, 13 Feb 2024 10:17:56 -0800
Subject: [PATCH] fix bazel compilation for grunning

---
pkg/util/grunning/disabled.go | 5 -----
pkg/util/grunning/enabled.go | 28 ----------------------------
2 files changed, 33 deletions(-)
pkg/util/grunning/enabled.go | 27 ---------------------------
2 files changed, 32 deletions(-)
delete mode 100644 pkg/util/grunning/enabled.go

diff --git a/pkg/util/grunning/disabled.go b/pkg/util/grunning/disabled.go
index 7fdc2f0..89fcb2d 100644
index f175eb2..89fcb2d 100644
--- a/pkg/util/grunning/disabled.go
+++ b/pkg/util/grunning/disabled.go
@@ -8,11 +8,6 @@
Expand All @@ -19,18 +19,18 @@ index 7fdc2f0..89fcb2d 100644

-// See grunning.Supported() for an explanation behind this build tag.
-//
-//go:build freebsd || (linux && s390x) || !bazel
-// +build freebsd linux,s390x !bazel
-//go:build (linux && s390x) || !bazel
-// +build linux,s390x !bazel
-
package grunning

func grunningnanos() int64 { return 0 }
diff --git a/pkg/util/grunning/enabled.go b/pkg/util/grunning/enabled.go
deleted file mode 100644
index ab12aae..0000000
index f8cd1b5..0000000
--- a/pkg/util/grunning/enabled.go
+++ /dev/null
@@ -1,28 +0,0 @@
@@ -1,27 +0,0 @@
-// Copyright 2022 The Cockroach Authors.
-//
-// Use of this software is governed by the Business Source License
Expand All @@ -43,8 +43,7 @@ index ab12aae..0000000
-
-// See grunning.Supported() for an explanation behind this build tag.
-//
-//go:build !(freebsd || (linux && s390x) || !bazel)
-// +build !freebsd
-//go:build !((linux && s390x) || !bazel)
-// +build !linux !s390x
-// +build bazel
-
Expand All @@ -60,5 +59,5 @@ index ab12aae..0000000
-
-func supported() bool { return true }
--
2.39.2 (Apple Git-143)
2.38.1

Loading

0 comments on commit a6d7390

Please sign in to comment.