Skip to content

Commit a6d7390

Browse files
committed
go.mod: update to grpc-gateway v2
This commit takes the changes from #9 and applies them as a patch on top of new snapshots until we resolve the dependency issues.
1 parent 4168c29 commit a6d7390

File tree

10 files changed

+389
-105
lines changed

10 files changed

+389
-105
lines changed

go.mod

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ require (
1616
github.com/dustin/go-humanize v1.0.0
1717
github.com/gogo/protobuf v1.3.2
1818
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551
19-
github.com/google/go-cmp v0.5.8
20-
github.com/grpc-ecosystem/grpc-gateway v1.16.0
19+
github.com/google/go-cmp v0.6.0
20+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1
2121
github.com/lib/pq v1.10.6
2222
github.com/pierrre/geohash v1.0.0
2323
github.com/sasha-s/go-deadlock v0.3.1
@@ -34,17 +34,19 @@ require (
3434
github.com/davecgh/go-spew v1.1.1 // indirect
3535
github.com/getsentry/sentry-go v0.12.0 // indirect
3636
github.com/golang/protobuf v1.5.3 // indirect
37-
github.com/kr/pretty v0.3.0 // indirect
37+
github.com/kr/pretty v0.3.1 // indirect
3838
github.com/kr/text v0.2.0 // indirect
3939
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
4040
github.com/pkg/errors v0.9.1 // indirect
4141
github.com/pmezard/go-difflib v1.0.0 // indirect
42-
github.com/rogpeppe/go-internal v1.8.1 // indirect
42+
github.com/rogpeppe/go-internal v1.9.0 // indirect
4343
github.com/twpayne/go-kml v1.5.2 // indirect
4444
golang.org/x/mod v0.14.0 // indirect
45-
golang.org/x/sys v0.15.0 // indirect
46-
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84 // indirect
47-
google.golang.org/grpc v1.40.1 // indirect
48-
google.golang.org/protobuf v1.31.0 // indirect
49-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
45+
golang.org/x/net v0.20.0 // indirect
46+
golang.org/x/sys v0.16.0 // indirect
47+
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
48+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
49+
google.golang.org/grpc v1.61.0 // indirect
50+
google.golang.org/protobuf v1.32.0 // indirect
51+
gopkg.in/yaml.v3 v3.0.1 // indirect
5052
)

go.sum

Lines changed: 24 additions & 35 deletions
Large diffs are not rendered by default.

patches/0002-fix-quote-names.sql renamed to patches/0002-fix-quote-names.patch

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
diff --git a/pkg/sql/sem/tree/type_name.go b/pkg/sql/sem/tree/type_name.go
2-
index 898009a..5d4423a 100644
2+
index a671b41..51e484b 100644
33
--- a/pkg/sql/sem/tree/type_name.go
44
+++ b/pkg/sql/sem/tree/type_name.go
5-
@@ -56,8 +56,7 @@ func (t *TypeName) String() string {
6-
5+
@@ -48,7 +48,7 @@ func (t *TypeName) Format(ctx *FmtCtx) {
76
// SQLString implements the ResolvableTypeReference interface.
87
func (t *TypeName) SQLString() string {
9-
- // FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
8+
// FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
109
- return AsStringWithFlags(t, FmtBareIdentifiers)
1110
+ return AsStringWithFlags(t, FmtSimple)
1211
}
1312

14-
// FQString renders the type name in full, not omitting the prefix
15-
@@ -250,14 +249,12 @@ func (node *ArrayTypeReference) Format(ctx *FmtCtx) {
16-
13+
func (t *TypeName) objectName() {}
14+
@@ -240,13 +240,13 @@ func (node *ArrayTypeReference) Format(ctx *FmtCtx) {
1715
// SQLString implements the ResolvableTypeReference interface.
1816
func (node *ArrayTypeReference) SQLString() string {
19-
- // FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
17+
// FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
2018
- return AsStringWithFlags(node, FmtBareIdentifiers)
2119
+ return AsStringWithFlags(node, FmtSimple)
2220
}
2321

2422
// SQLString implements the ResolvableTypeReference interface.
2523
func (name *UnresolvedObjectName) SQLString() string {
26-
- // FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
24+
// FmtBareIdentifiers prevents the TypeName string from being wrapped in quotations.
2725
- return AsStringWithFlags(name, FmtBareIdentifiers)
2826
+ return AsStringWithFlags(name, FmtSimple)
2927
}

patches/0004-fix-bazel-compl.patch

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
From d300afb062569278ff9e770b4f7e0ed0d84f6f82 Mon Sep 17 00:00:00 2001
2-
From: Oliver Tan <otan@cockroachlabs.com>
3-
Date: Mon, 15 May 2023 14:21:32 +1000
1+
From fd8c124e5968547a82fecc92e6081fdd71a4b49a Mon Sep 17 00:00:00 2001
2+
From: Jeremy Yang <jyang@cockroachlabs.com>
3+
Date: Tue, 13 Feb 2024 10:17:56 -0800
44
Subject: [PATCH] fix bazel compilation for grunning
55

66
---
77
pkg/util/grunning/disabled.go | 5 -----
8-
pkg/util/grunning/enabled.go | 28 ----------------------------
9-
2 files changed, 33 deletions(-)
8+
pkg/util/grunning/enabled.go | 27 ---------------------------
9+
2 files changed, 32 deletions(-)
1010
delete mode 100644 pkg/util/grunning/enabled.go
1111

1212
diff --git a/pkg/util/grunning/disabled.go b/pkg/util/grunning/disabled.go
13-
index 7fdc2f0..89fcb2d 100644
13+
index f175eb2..89fcb2d 100644
1414
--- a/pkg/util/grunning/disabled.go
1515
+++ b/pkg/util/grunning/disabled.go
1616
@@ -8,11 +8,6 @@
@@ -19,18 +19,18 @@ index 7fdc2f0..89fcb2d 100644
1919

2020
-// See grunning.Supported() for an explanation behind this build tag.
2121
-//
22-
-//go:build freebsd || (linux && s390x) || !bazel
23-
-// +build freebsd linux,s390x !bazel
22+
-//go:build (linux && s390x) || !bazel
23+
-// +build linux,s390x !bazel
2424
-
2525
package grunning
2626

2727
func grunningnanos() int64 { return 0 }
2828
diff --git a/pkg/util/grunning/enabled.go b/pkg/util/grunning/enabled.go
2929
deleted file mode 100644
30-
index ab12aae..0000000
30+
index f8cd1b5..0000000
3131
--- a/pkg/util/grunning/enabled.go
3232
+++ /dev/null
33-
@@ -1,28 +0,0 @@
33+
@@ -1,27 +0,0 @@
3434
-// Copyright 2022 The Cockroach Authors.
3535
-//
3636
-// Use of this software is governed by the Business Source License
@@ -43,8 +43,7 @@ index ab12aae..0000000
4343
-
4444
-// See grunning.Supported() for an explanation behind this build tag.
4545
-//
46-
-//go:build !(freebsd || (linux && s390x) || !bazel)
47-
-// +build !freebsd
46+
-//go:build !((linux && s390x) || !bazel)
4847
-// +build !linux !s390x
4948
-// +build bazel
5049
-
@@ -60,5 +59,5 @@ index ab12aae..0000000
6059
-
6160
-func supported() bool { return true }
6261
--
63-
2.39.2 (Apple Git-143)
62+
2.38.1
6463

0 commit comments

Comments
 (0)