On Thu, 13 May 2021, 11:20 am Jim Idle, <j...@temporal-wave.com> wrote:

> Create a separate module that contains only the .proto files and use the
> generate directive. You can then version that module and share it. If your
> client is some other language, you can generate Its code from the same repo
> at the same version using your CI. For instance generate a pip wheel as
> well as the go source.
>
> By checking in the generated code for all languages, you guarantee that it
> is in a particular state and that your build is reproducible. It sounds
> counter intuitive, but Makes sense once you've cogitated on it.
>

Thanks. I think I get it. So the repo containing the .proto files would
have a .go file with the generate directives to do the necessary
generation. And the go.mod file of course.


> On Wed, May 12, 2021 at 18:47 Amit Saha <amitsaha...@gmail.com> wrote:
>
>> Hi all, this is only relevant to people using grpc.  I posted the query
>> below to the grpc mailing list, thought of posting it here as welll.
>>
>> How are you importing the generated definitions and other resources
>> them into your server and client? As far as I see it now, the protoc
>> command will not generate a go.mod file in the generated code which
>> means - you have to do it manually and then import them into your
>> server and client. That is, you will have three modules:
>>
>> - One for server
>> - One for client
>> - One for the generated code
>>
>> This seems to be the cleanest approach. During local development, we
>> will then use the "replace" directive for iteration.
>>
>> I am keen to hear how it's being done by others in the community.
>>
>> Thanks,
>> Amit.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-nuts+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/CANODV3kqN0wtK5bO3AfVbUhMt1iE9eYvboqbzmSLnY72N6-a6A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/golang-nuts/CANODV3kqN0wtK5bO3AfVbUhMt1iE9eYvboqbzmSLnY72N6-a6A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANODV3myjXgHC9zuxR1J0tPOjDqOXeGVgZ%3DQE9UijVLTPBqFsw%40mail.gmail.com.

Reply via email to