Repository: goadesign/goa
Pull request #3264 (2023-03-20 05:01:21)

Remove use of deprecated package


Patch:
diff --git a/Makefile b/Makefile
index a6f5ff71..9e4e84fd 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ all: lint test
 ci: depend all
 
 # Install protoc
-PROTOC_VERSION=22.1
+PROTOC_VERSION=22.2
 UNZIP=unzip
 ifeq ($(GOOS),linux)
 	PROTOC=protoc-$(PROTOC_VERSION)-linux-x86_64
diff --git a/README.md b/README.md
index 0687fbcb..ab262203 100644
--- a/README.md
+++ b/README.md
@@ -32,25 +32,6 @@ promoting reuse and standardization across services.
 
 ## Sponsors
 
-<table width="100%">
-    <tr>
-        <td>
-            <img width="1000" height="0" />
-            <a href="https://www.runforesight.com/?utm_source=goa&utm_medium=sponsorship">
-                <img src="https://www.thundra.io/hubfs/RunForesight/GitHub%20Sponsorship%20banners/power-up-github.png" alt="Foresight" width="260" align="right" />
-            </a>
-            <h3>Foresight: Increase CI/CD Health & Test Performance</h3>
-            <p>
-                Foresight provides full visibility and deep insights into the health
-                and performance of your tests and CI pipelines. Assess the risk of
-                changes, resolve bottlenecks, reduce build times, and deliver
-                high-quality software at speed with Foresight.
-            </p>
-
-[Sign up now!](https://runforesight.com/?utm_source=goa&utm_medium=sponsorship)
-        </td>
-    </tr>
-</table>
 <table width="100%">
     <tr>
         <td>
diff --git a/grpc/codegen/example_server.go b/grpc/codegen/example_server.go
index c3381997..0a6fc46b 100644
--- a/grpc/codegen/example_server.go
+++ b/grpc/codegen/example_server.go
@@ -54,7 +54,6 @@ func exampleServer(genpkg string, root *expr.RootExpr, svr *expr.ServerExpr) *co
 			codegen.GoaNamedImport("grpc/middleware", "grpcmdlwr"),
 			{Path: "google.golang.org/grpc"},
 			{Path: "google.golang.org/grpc/reflection"},
-			{Path: "github.com/grpc-ecosystem/go-grpc-middleware", Name: "grpcmiddleware"},
 		}
 		for _, svc := range root.API.GRPC.Services {
 			sd := GRPCServices.Get(svc.Name())
@@ -193,12 +192,12 @@ func handleGRPCServer(ctx context.Context, u *url.URL{{ range $.Services }}{{ if
 	grpcRegisterSvrT = `
 	// Initialize gRPC server with the middleware.
 	srv := grpc.NewServer(
-		grpcmiddleware.WithUnaryServerChain(
+		grpc.ChainUnaryInterceptor(
 			grpcmdlwr.UnaryRequestID(),
 			grpcmdlwr.UnaryServerLog(adapter),
 		),
 	{{- if needStream .Services }}
-		grpcmiddleware.WithStreamServerChain(
+		grpc.ChainStreamInterceptor(
 			grpcmdlwr.StreamRequestID(),
 			grpcmdlwr.StreamServerLog(adapter),
 		),


Test patch:
diff --git a/grpc/codegen/testdata/example_code.go b/grpc/codegen/testdata/example_code.go
index f812f770..29851bd0 100644
--- a/grpc/codegen/testdata/example_code.go
+++ b/grpc/codegen/testdata/example_code.go
@@ -25,7 +25,7 @@ func handleGRPCServer(ctx context.Context, u *url.URL, serviceEndpoints *service
 
 	// Initialize gRPC server with the middleware.
 	srv := grpc.NewServer(
-		grpcmiddleware.WithUnaryServerChain(
+		grpc.ChainUnaryInterceptor(
 			grpcmdlwr.UnaryRequestID(),
 			grpcmdlwr.UnaryServerLog(adapter),
 		),
@@ -90,7 +90,7 @@ func handleGRPCServer(ctx context.Context, u *url.URL, serviceEndpoints *service
 
 	// Initialize gRPC server with the middleware.
 	srv := grpc.NewServer(
-		grpcmiddleware.WithUnaryServerChain(
+		grpc.ChainUnaryInterceptor(
 			grpcmdlwr.UnaryRequestID(),
 			grpcmdlwr.UnaryServerLog(adapter),
 		),
@@ -157,7 +157,7 @@ func handleGRPCServer(ctx context.Context, u *url.URL, serviceEndpoints *service
 
 	// Initialize gRPC server with the middleware.
 	srv := grpc.NewServer(
-		grpcmiddleware.WithUnaryServerChain(
+		grpc.ChainUnaryInterceptor(
 			grpcmdlwr.UnaryRequestID(),
 			grpcmdlwr.UnaryServerLog(adapter),
 		),