numaflow-go
numaflow-go copied to clipboard
Avoid installing project specific binaries to system paths
Currently we depend on 3 gRPC specific binaries: protoc-gen-go
, protoc-gen-go-grpc
and protoc
.
We manage the version of protoc-gen-go
and protoc-gen-go-grpc
in the go.mod
file. These binaries are installed if they doesn't already exist in the user's $PATH
. If the user has a different version of this binary already installed, the version we specify in the go.mod
will not be installed. This creates changes in the code generated from .proto
files.
https://github.com/numaproj/numaflow-go/blob/39fbfd46c0a08690840eb0d81fa45dd5dad31b18/go.mod#L12 https://github.com/numaproj/numaflow-go/blob/39fbfd46c0a08690840eb0d81fa45dd5dad31b18/pkg/apis/proto/map/v1/map_grpc.pb.go#L3
I think we can install these binaries within a sub-directory of the numaflow-go
(e.g., bin/
) using the Makefile
. The implementation should be easy - the GOBIN
can be used to make go install
binaries to a custom directory, and the protoc
is available as a static binary.