These are chat archives for trueaccord/ScalaPB

Jun 2018
Dominic Bou-Samra
Jun 07 09:42
is there any way to prefix all the generate types with something like GRPC* ?
Nadav Samet
Jun 07 15:02
@dbousamra , not automatically for all of them, but you can manually set the Scala name for messages to be whatever you want by adding an option
Alexander Shniperson
Jun 07 15:16
is there full example of how to use custom code generation? looks like here is lost source
Andrea Peruffo
Jun 07 16:05
@thesamet probably faster to discuss here :-)
thanks for the guidance first!


I wonder if the new generator and runtime functions can be shipped in a separate library (even if it's hosted in this repo)?

in the past I did it like this:

basically giving the user the possibility to set what generator to use:

does this apply somehow also to ScalaPB?

Nadav Samet
Jun 07 16:40
@AlexanderShniperson that source you linked to can help you get started. There's also a UDT generator in sparksql-scalapb you can look at. I don't think there's anything better, but feel free to ask questions here.
@andreaTP Exactly, if you create a new generator, a user can just add it to their PB.targets and have it generate their code
Andrea Peruffo
Jun 07 16:53
ok, I will go for it, it will break compatibility though ... I guess
(it will take time to get to a full implementation tough ... I'm doing it in spare time)
Nadav Samet
Jun 07 18:18
@andreaTP why would it break compatibility if it's a separate generator? In what way?