Skip to content
Merged
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
8 changes: 5 additions & 3 deletions tools/protobuf-compile/protobuf-compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const protocVersion = "3.15.6"
// in Go modules our version selection for these comes from our top-level
// go.mod, as with all other Go dependencies. If you want to switch to a newer
// version of either tool then you can upgrade their modules in the usual way.
//
// TODO: Swap to using google.golang.org/protobuf/cmd/protoc-gen-go
const protocGenGoPackage = "github.com/golang/protobuf/protoc-gen-go"
Comment on lines +36 to 38
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I investigated this change but it requires significant changes to the flags passed into protoc, so I think it's worth addressing in a separate PR.

const protocGenGoGrpcPackage = "google.golang.org/grpc/cmd/protoc-gen-go-grpc"

Expand Down Expand Up @@ -144,7 +146,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
_, err = buildProtocGenGoGrpc(workDir)
protocGenGoGrpcExec, err := buildProtocGenGoGrpc(workDir)
if err != nil {
log.Fatal(err)
}
Expand All @@ -157,7 +159,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
protocGenGoGrpcExec, err := filepath.Abs(protocGenGoExec)
protocGenGoGrpcExec, err = filepath.Abs(protocGenGoGrpcExec)
if err != nil {
log.Fatal(err)
}
Expand All @@ -175,7 +177,7 @@ func main() {

cmd := &exec.Cmd{
Path: cmdLine[0],
Args: cmdLine[1:],
Args: cmdLine,
Dir: step.WorkDir,
Env: os.Environ(),
Stdout: os.Stdout,
Expand Down