-
Notifications
You must be signed in to change notification settings - Fork 280
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
Allow restricting the output languages for given proto files #2432
Comments
So, perhaps this can be done with version: v1
managed:
enabled: true
optimize_for: LITE_RUNTIME
plugins:
# typescript
- plugin: buf.build/community/timostamm-protobuf-ts
out: gen/ts
exclude: [service1, service2]
# golang
- plugin: buf.build/grpc/go
include: [service1]
out: gen/go
opt:
- paths=source_relative
- plugin: buf.build/protocolbuffers/go
include: [service1]
out: gen/go
opt:
- paths=source_relative
# swift
- plugin: buf.build/grpc/swift
include: [service2]
out: gen/swift
- plugin: buf.build/apple/swift
include: [service2]
out: gen/swift Note the addition of include / exclude. |
You can use seperate |
Thanks, but this pretty much defeats the purpose of having a tool like this. The moment using it becomes more cumbersum than using protoc directly, there is really no point for it. |
We've made improvements to this in Our guidance here would be to review our |
Given the provided guidance to migrate to |
I strongly agree with this statement. I have a somewhat similar issue over in #3060. My thought was that extending the module concept to include gen rules would help a lot. Not entirely sure if that addresses this one too ... maybe? |
Hi,
So the issue I have is that I am using buf to generate clients and servers for multiple languages (4 and counting). I need some proto files to generate code only in go, others in a couple of languages, and others in all languages. There is not way for me to do this now using a single workspace, or am I missing something?
I would love to have some simple configuration (exclude / include, etc.) or an ability to next buf.gen files in sub folders rather than have these top level. As it stands now, I have to generate a large amount of completely useless code.
The text was updated successfully, but these errors were encountered: