You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert a monorepo project into a workspace and use modules for each of our services. However, some of our modules require different buf.gen.yaml configurations and I'm struggling to understand how I should go about doing this. Some examples of config differences:
Some legacy protos use the GRPC plugin and some newer things are using the Connect plugins. I don't want to generate GRPC code if I don't need it and vice versa.
Some of our modules only need to generate Go code, and some of them need to generate Go and Typescript. To make things worse, the Typescript generators require an npm package and I really don't want to put a package.json in our monorepo root just for Typescript generation.
I'd like to use the managed go_package_prefix setting, but this would be different per module.
I would expect to be able to create a buf.gen.yaml in each module and run buf generate from the project root, but unfortunately this gives me the error Failure: buf.gen.yaml: does not exist and if I create one, everything uses that global config instead of the module specific ones.
I see that I could use the --template and --path options and specify the service-specific buf.gen.yaml and the path to the service's proto that I want to generate code from, but this doesn't feel nice and removes one of the main advantages of using a workspace IMO.
Am I misunderstanding something about how to set this up or is this simply something that workspaces can't do at the moment?
I'm trying to convert a monorepo project into a workspace and use modules for each of our services. However, some of our modules require different
buf.gen.yaml
configurations and I'm struggling to understand how I should go about doing this. Some examples of config differences:npm
package and I really don't want to put apackage.json
in our monorepo root just for Typescript generation.go_package_prefix
setting, but this would be different per module.I would expect to be able to create a
buf.gen.yaml
in each module and runbuf generate
from the project root, but unfortunately this gives me the errorFailure: buf.gen.yaml: does not exist
and if I create one, everything uses that global config instead of the module specific ones.I see that I could use the
--template
and--path
options and specify the service-specificbuf.gen.yaml
and the path to the service's proto that I want to generate code from, but this doesn't feel nice and removes one of the main advantages of using a workspace IMO.Am I misunderstanding something about how to set this up or is this simply something that workspaces can't do at the moment?
Rough recreation of the project layout:
The text was updated successfully, but these errors were encountered: