Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support for installing Golang binaries from go install #670

Open
bradhe opened this issue Dec 9, 2024 · 1 comment
Open

Comments

@bradhe
Copy link

bradhe commented Dec 9, 2024

We've adopted moon and, by virtue of that, proto as our standard tooling for managing our toolchain and builds in our monorepo. We use protobuf and gRPC for many things and thus I'm looking for a solution to standardize the protoc dependency and the bindings for Golang. Protobuf is easy enough, we'll just need to create a custom plugin for protoc. The bindings portion is a bit more complicated.

The gPRC bindings are installed using go install, in point go install at google.golang.org/grpc/cmd/protoc-gen-go-grpc and it knows how to build the Golang code and put the resultant binary somewhere you can use later on.

I suppose this is potentially possible to create a WASM plugin in proto for this but I'm not 100% certain. In general, more first-class support for Golang would be amazing in moon and proto.

@milesj
Copy link
Contributor

milesj commented Dec 9, 2024

This should be entirely doable with a WASM plugin, as you can run child processes and make file operations from it.

As for the Go requirement, you can either configure the plugin to require go from proto, or check that the Go binary exists.

I think the only thing proto can't handle 100% is ensuring that the $(go env GOPATH)/bin is in PATH. We do check for this automatically, but it's only inherited if the user is using proto activate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants