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

Bump github.com/jhump/protoreflect from 1.12.0 to 1.14.0 #203

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
shared_configs:
simple_job_steps: &simple_job_steps
- checkout
- run:
name: Run tests
command: |
make deps test
full_job_steps: &full_job_steps
- checkout
- run:
name: Run tests
command: |
make ci


# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
jobs:
build-1-15:
working_directory: ~/repo
docker:
- image: cimg/go:1.15
steps: *simple_job_steps

build-1-16:
working_directory: ~/repo
docker:
- image: cimg/go:1.16
steps: *full_job_steps

build-1-17:
working_directory: ~/repo
docker:
Expand All @@ -40,10 +21,15 @@ jobs:
- image: cimg/go:1.18
steps: *simple_job_steps

build-1-19:
working_directory: ~/repo
docker:
- image: cimg/go:1.19
steps: *simple_job_steps

workflows:
pr-build-test:
jobs:
- build-1-15
- build-1-16
- build-1-17
- build-1-18
- build-1-19
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ vet:

.PHONY: staticcheck
staticcheck:
@go install honnef.co/go/tools/cmd/staticcheck@v0.0.1-2020.1.4
@go install honnef.co/go/tools/cmd/staticcheck@v0.3.3
staticcheck ./...

.PHONY: ineffassign
Expand All @@ -62,21 +62,19 @@ ineffassign:

.PHONY: predeclared
predeclared:
@go install github.com/nishanths/predeclared@86fad755b4d3
predeclared .
@go install github.com/nishanths/predeclared@5f2f810c9ae6
predeclared ./...

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: golint
golint:
# TODO: pin version
@go install golang.org/x/lint/golint@latest
@go install golang.org/x/lint/golint@v0.0.0-20210508222113-6edffad5e616
golint -min_confidence 0.9 -set_exit_status ./...

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: errcheck
errcheck:
# TODO: pin version
@go install github.com/kisielk/errcheck@latest
@go install github.com/kisielk/errcheck@v1.2.0
errcheck ./...

.PHONY: test
Expand Down
1 change: 1 addition & 0 deletions cmd/grpcui/go1_10.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/grpcui/go1_9.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.10
// +build !go1.10

package main
Expand Down
2 changes: 1 addition & 1 deletion cmd/grpcui/grpcui.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ func main() {
if reflection.val {
md := grpcurl.MetadataFromHeaders(append(addlHeaders, reflHeaders...))
refCtx := metadata.NewOutgoingContext(ctx, md)
refClient = grpcreflect.NewClient(refCtx, reflectpb.NewServerReflectionClient(cc))
refClient = grpcreflect.NewClientV1Alpha(refCtx, reflectpb.NewServerReflectionClient(cc))
reflSource := grpcurl.DescriptorSourceFromServer(ctx, refClient)
if fileSource != nil {
descSource = compositeSource{reflSource, fileSource}
Expand Down
1 change: 1 addition & 0 deletions cmd/grpcui/unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package main
Expand Down
2 changes: 1 addition & 1 deletion files.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
// reflection.)
func AllFilesViaReflection(ctx context.Context, cc grpc.ClientConnInterface) ([]*desc.FileDescriptor, error) {
stub := rpb.NewServerReflectionClient(cc)
cli := grpcreflect.NewClient(ctx, stub)
cli := grpcreflect.NewClientV1Alpha(ctx, stub)
source := grpcurl.DescriptorSourceFromServer(ctx, cli)
return grpcurl.GetAllFiles(source)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.15
require (
github.com/fullstorydev/grpcurl v1.8.6
github.com/golang/protobuf v1.5.2
github.com/jhump/protoreflect v1.12.0
github.com/jhump/protoreflect v1.14.0
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/net v0.0.0-20200822124328-c89045814202
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+
github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ=
github.com/jhump/protoreflect v1.10.3/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
github.com/jhump/protoreflect v1.12.0 h1:1NQ4FpWMgn3by/n1X0fbeKEUxP1wBt7+Oitpv01HR10=
github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
github.com/jhump/protoreflect v1.14.0 h1:MBbQK392K3u8NTLbKOCIi3XdI+y+c6yt5oMq0X3xviw=
github.com/jhump/protoreflect v1.14.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
Expand Down Expand Up @@ -233,7 +233,6 @@ golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 h1:QyVthZKMsyaQwBTJE04jdNN0Pp5Fn9Qga0mrgxyERQM=
golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
6 changes: 3 additions & 3 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ func RPCMetadataHandler(methods []*desc.MethodDescriptor, files []*desc.FileDesc
}

// TODO(jaime, jhump): schema is playing double duty here. It's both a vehicle for all
// message and enum metadata. As well as RPC method scoped metadata for a single method.
// What if we wanted to load metadata for all methods? We should consider splitting this
// into 2 separate types for metadata to respond with accordingly.
// message and enum metadata. As well as RPC method scoped metadata for a single method.
// What if we wanted to load metadata for all methods? We should consider splitting this
// into 2 separate types for metadata to respond with accordingly.
type schema struct {
RequestType string `json:"requestType"`
RequestStream bool `json:"requestStream"`
Expand Down
12 changes: 7 additions & 5 deletions internal/resources/standalone/bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,13 @@ var _bindata = map[string]func() (*asset, error){
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
Expand Down
12 changes: 7 additions & 5 deletions internal/resources/webform/bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@ var _bindata = map[string]func() (*asset, error){
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
Expand Down
2 changes: 1 addition & 1 deletion methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func AllMethodsForServer(svr *grpc.Server) ([]*desc.MethodDescriptor, error) {
// a desired inclusion.
func AllMethodsViaReflection(ctx context.Context, cc grpc.ClientConnInterface) ([]*desc.MethodDescriptor, error) {
stub := rpb.NewServerReflectionClient(cc)
cli := grpcreflect.NewClient(ctx, stub)
cli := grpcreflect.NewClientV1Alpha(ctx, stub)
svcNames, err := cli.ListServices()
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion testing/assets/assets_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test_assets
package assets_test

import (
"github.com/fullstorydev/grpcui/internal/resources/standalone"
Expand Down
24 changes: 12 additions & 12 deletions webform.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ var (
// respectively. Handlers for these endpoints are provided via the
// RPCInvokeHandler and RPCMetadataHandler functions:
//
// // This example uses "/rpcs" as the base URI.
// pageHandler := func(w http.ResponseWriter, r *http.Request) {
// webForm := grpcui.WebFormContents("/rpcs/invoke/", "/rpcs/metadata", descs)
// webFormJs := grpcui.WebFormScript()
// generateHTMLPage(w, r, webForm, webFormJs)
// }
// // This example uses "/rpcs" as the base URI.
// pageHandler := func(w http.ResponseWriter, r *http.Request) {
// webForm := grpcui.WebFormContents("/rpcs/invoke/", "/rpcs/metadata", descs)
// webFormJs := grpcui.WebFormScript()
// generateHTMLPage(w, r, webForm, webFormJs)
// }
//
// // Make sure the RPC handlers are registered at the same URI paths
// // that were used in the call to WebFormContents:
// rpcInvokeHandler := http.StripPrefix("/rpcs/invoke", grpcui.RPCInvokeHandler(conn, descs))
// mux.Handle("/rpcs/invoke/", rpcInvokeHandler)
// mux.Handle("/rpcs/metadata", grpcui.RPCMetadataHandler(descs))
// mux.HandleFunc("/rpcs/index.html", pageHandler)
// // Make sure the RPC handlers are registered at the same URI paths
// // that were used in the call to WebFormContents:
// rpcInvokeHandler := http.StripPrefix("/rpcs/invoke", grpcui.RPCInvokeHandler(conn, descs))
// mux.Handle("/rpcs/invoke/", rpcInvokeHandler)
// mux.Handle("/rpcs/metadata", grpcui.RPCMetadataHandler(descs))
// mux.HandleFunc("/rpcs/index.html", pageHandler)
//
// The given descs is a slice of methods which are exposed through the web form.
// You can use AllMethodsForServices, AllMethodsForServer, and
Expand Down