-
Sometimes you want to generate code using a plugin, such as Twirp, that puts all code into the same package, and you need to generate the code with dependencies. However this creates a conflict in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Full example available at: https://github.com/mfridman/buf-generate-twirp-go To start, when you generate, you can use the
The workaround here is to generate the dependent modules (in this case,
|
Beta Was this translation helpful? Give feedback.
Full example available at: https://github.com/mfridman/buf-generate-twirp-go
To start, when you generate, you can use the
--include-imports
flag in order to ensure that you are including the necessary dependencies. However, you'll find that you may get a conflict:petapis
is dependentpaymentapis
and both are dependent ongoogleapis
.The workaround here is to generate the dependent modules (in this case,
paymentapis
) separately with a differentbuf.gen.yaml
template that only contains the Go plugin: