From 41ef85a5594954ed81825af166257d47fc7a406f Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Thu, 15 Oct 2020 15:25:40 -0700 Subject: [PATCH] all: add weak dependency on github.com/golang/protobuf Add back the weak dependency on github.com/golang/protobuf. Change-Id: I2e6fabbe2cac3b694fb56a86bb3aa85cc8615b42 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/262684 Trust: Joe Tsai Reviewed-by: Damien Neil --- go.mod | 5 ++++- go.sum | 3 +++ internal/weakdeps/weakdeps.go | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index cadaefe1f..3dda8e330 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,7 @@ module google.golang.org/protobuf go 1.9 -require github.com/google/go-cmp v0.5.5 +require ( + github.com/golang/protobuf v1.5.0 + github.com/google/go-cmp v0.5.5 +) diff --git a/go.sum b/go.sum index 0a5f3e09b..6ba69844a 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,7 @@ +github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= diff --git a/internal/weakdeps/weakdeps.go b/internal/weakdeps/weakdeps.go index 657dbe917..59b34758c 100644 --- a/internal/weakdeps/weakdeps.go +++ b/internal/weakdeps/weakdeps.go @@ -7,8 +7,8 @@ package weakdeps import ( -// Ensure that any program using "github.com/golang/protobuf" -// uses a version that wraps this module so that there is a -// unified view on what protobuf types are globally registered. -// _ "github.com/golang/protobuf/proto" // TODO: add this back + // Ensure that any program using "github.com/golang/protobuf" + // uses a version that wraps this module so that there is a + // unified view on what protobuf types are globally registered. + _ "github.com/golang/protobuf/proto" )