Hi Nadav,
Thanks for the response. After looking more closely at protocbridge,
I'm still confused about why it works the way it does.
The provided binary on
https://github.com/scalapb/ScalaPB/releases is
a standalone `scalapbc` script, which launches the jvm, which then
launches a subprocess of the actual protoc compiler (from inside a
jar), which communicates back to its parent process through some fifo
redirection.
What I expected instead is a `gen-protoc-scala` script which, when put
on the PATH or passed to `protoc --plugin=gen-protoc-scala`, will
accept the codegen request on System.in, and exits after outputting to
System.out. In other words, `scalapbc` runs `protoc` for you, with no
(apparent) way to instead have your own copy of protoc call into
`scalapbc`. Roughly speaking, something like:
```
object main {
def main(args: Array[String]): Unit = {
val req = CodeGeneratorRequest.parseFrom(System.in)
val res = ProtocCodegenerator.run(req)
res.writeTo(System.out)
}
}
```
and `gen-protoc-scala`:
```
#/usr/bin/env bash
exec java -jar scalapb.jar
```
Is there a particular problem that the indirection of protocbridge and
the `scalapbc` wrapper works around? I scanned through the issues and
commits but nothing stood out.
Thanks,
Steven
>> email to
scalapb+u...@googlegroups.com.
--
*CONFIDENTIALITY NOTICE: This email message, and any documents, files or
previous e-mail messages attached to it is for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply email
and destroy all copies of the original message.*