protobuf-go/internal/weakdeps
Damien Neil 06e51b76b4 internal/weakdeps: put APIv1 weak dependency behind a build constraint
By using a build constraint that is never satisfied, we can add a weak
dependency on a module. If the module is part of a build, our go.mod
enforces a minimum version on it, but we never add it to the build
dependencies ourselves.

This is the same trick used for tool dependencies:
https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module

Dropped the TODO to remove the APIv1 dependency, since I think this
removes any need to do so.

Change-Id: I45b1a3f45535bcdc9abf34fb562d2869f1712bb6
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/219499
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2020-02-14 21:08:34 +00:00
..
doc.go internal/weakdeps: put APIv1 weak dependency behind a build constraint 2020-02-14 21:08:34 +00:00
weakdeps.go internal/weakdeps: put APIv1 weak dependency behind a build constraint 2020-02-14 21:08:34 +00:00