You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may not be a bug, so sorry if this is not the right place but I couldn't find a mailing list.
I am investigating ScalaPB as a replacement for sbtprotobuf and pure-Java classes.
When I run the generation command I get this:
> protobuf:protobufGenerate
[info] Compiling 2 protobuf files to /<snip>/server/target/scala-2.10/src_managed/main/compiled_protobuf,/<snip>/server/target/scala-2.10/src_managed/main/compiled_protobuf
[info] Compiling schema /<snip>/server/src/main/protobuf/abc.proto
[info] Compiling schema /<snip>/server/src/main/protobuf/soundcloud.proto
[error] protoc-gen-scala: program not found or is not executable
[error] --scala_out: protoc-gen-scala: Plugin failed with status code 1.
[trace] Stack trace suppressed: run 'last abc/protobuf:protobufGenerate' for the full output.
[error] (abc/protobuf:protobufGenerate) protoc returned exit code: 1
[error] Total time: 0 s, completed Dec 22, 2014 6:25:37 PM
Full output:
> last abc/protobuf:protobufGenerate
[info] Compiling 2 protobuf files to /<snip>/server/target/scala-2.10/src_managed/main/compiled_protobuf,/<snip>/server/target/scala-2.10/src_managed/main/compiled_protobuf
[debug] protoc options:
[debug] --java_out=/<snip>/server/target/scala-2.10/src_managed/main/compiled_protobuf
[debug] --scala_out=/<snip>/server/target/scala-2.10/src_managed/main/compiled_protobuf
[info] Compiling schema /<snip>/server/src/main/protobuf/abc.proto
[info] Compiling schema /<snip>/server/src/main/protobuf/soundcloud.proto
[error] protoc-gen-scala: program not found or is not executable
[error] --scala_out: protoc-gen-scala: Plugin failed with status code 1.
java.lang.RuntimeException: protoc returned exit code: 1
at scala.sys.package$.error(package.scala:27)
at sbtprotobuf.ProtobufPlugin$.sbtprotobuf$ProtobufPlugin$$compile(ProtobufPlugin.scala:86)
at sbtprotobuf.ProtobufPlugin$$anonfun$sourceGeneratorTask$1$$anonfun$6.apply(ProtobufPlugin.scala:110)
at sbtprotobuf.ProtobufPlugin$$anonfun$sourceGeneratorTask$1$$anonfun$6.apply(ProtobufPlugin.scala:109)
at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:188)
at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:188)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:202)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:198)
at sbt.Difference.apply(Tracked.scala:177)
at sbt.Difference.apply(Tracked.scala:158)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:198)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:197)
at sbt.Difference.apply(Tracked.scala:177)
at sbt.Difference.apply(Tracked.scala:152)
at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:197)
at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:195)
at sbtprotobuf.ProtobufPlugin$$anonfun$sourceGeneratorTask$1.apply(ProtobufPlugin.scala:112)
at sbtprotobuf.ProtobufPlugin$$anonfun$sourceGeneratorTask$1.apply(ProtobufPlugin.scala:107)
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (abc/protobuf:protobufGenerate) protoc returned exit code: 1
From all this I assume I need to have a plugin called protoc-gen-scala (I thought ScalaPB had its own plugin?). Google takes me to this project: https://github.com/ktoso/protoc-gen-scala, which seems quite old. Either way the build instructions there don't work for me either, so my question becomes: how do I setup protoc-gen-scala to work with ScalaPB?
Just running "compile" will generate Scala sources and compile them,
If you want to just generate the sources without compiling them use:
protobuf:protobufScalaGenerate
I'll add some documentation for this, I figured most people would just invoke it through the 'compile' command. Also note that currently, the SBT plugin should work only on Unix-like systems.
Hey,
This may not be a bug, so sorry if this is not the right place but I couldn't find a mailing list.
I am investigating ScalaPB as a replacement for sbtprotobuf and pure-Java classes.
When I run the generation command I get this:
Full output:
From all this I assume I need to have a plugin called
protoc-gen-scala
(I thought ScalaPB had its own plugin?). Google takes me to this project: https://github.com/ktoso/protoc-gen-scala, which seems quite old. Either way the build instructions there don't work for me either, so my question becomes: how do I setupprotoc-gen-scala
to work with ScalaPB?Here is my
plugins.sbt
And here are the relevant bits in
Build.scala
:I've tried versions released before November and had the same issues.
Thanks!
The text was updated successfully, but these errors were encountered: