ScalaPB Fail with `Plugin output is unparseable`

Created on 7 Jun 2019  Â·  36Comments  Â·  Source: scalapb/ScalaPB

I have been trying to use ScalaPB, and frequently I get this error in my compile phase:

--scala_out: protoc-gen-scala: Plugin output is unparseable:

after that looks like the whole scala class dumped to stdout I can paste that as well if you want.

The message its trying to compile is pretty simple:

syntax = "proto3";

message Test {
    string thing = 1;
}

and I have the plugin configured as:

addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.21")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.9.0-RC1"

I have also tried a few versions ranging from 0.8.4 to 0.9.0-RC1 and sbt protoc 0.99.18 to 0.99.21

my build.sbt just has:

PB.targets in Compile := Seq(
  scalapb.gen() -> (sourceManaged in Compile).value
)

I even get this when I just run sbt protocGenerate

I am using sbt 1.2.6 and scala 2.12.7

more-info-needed

All 36 comments

@matt-christiansen-exa , we certainly haven't seen this one before! What operating system are you on (sbt-protoc talks to protoc in different ways on Windows and everything else).

Can you share anything else about your system that might be relevant? Any other errors/exceptions printed out?

Can you provide some project that I can try to compile and see if I can reproduce this problem on my environment?

Yeah I did a lot more testing, In short it seems to never fail in our Jenkins env (Linux, runs inside a docker container), it seems to fail sometimes on my mac (macOS 10.14.5) but eventually it works and then it works fine, for example its working for me right now and I haven't been able to make it fail again. I asked some others on my team and their experience was similar, some suggested that editing the proto file would sometimes make it work again.

I can't provide the exact project since its a work project, I'll try and see if I can make a more "vanilla" project and reproduce this.

Thanks @matt-christiansen-exa . I'm looking forward to instructions on reproducing this issue.

I made this project: https://github.com/matt-christiansen-exa/scalapb_594 which mirrors our general internal repo layout.

On my laptop (and a few other laptops around here) when I run sbt clean compile I get one of two issues:

1) The error message I opened in this ticket
2) No error but also no generated classes (silent failing)

Our Jenkins servers seems to be able to generate this without issue so it leads me to believe its something very mac specific. Like I said, the probably eventually goes away, if I do things like remove all proto files and then add them back in or make an empty one sometimes that seems to fix the problem.

I also tried just using scalapbc directly, and I get the same general results.

Thanks for sharing the test project. I tried to reproduce it on my MBP running OS X 10.14.5 and wasn't able to. I've been running sbt clean compile about 20 times and it worked every single time.

I think that the next step would be for you to clone https://github.com/scalapb/protoc-bridge , publish a local version, and have it added to your project/plugins.sbt as a dependency. Then start debugging what's going on.

On my side, I can add integration tests to protoc-bridge so it would be easier for you to reproduce it directly (without having to publish and run on a different project).

Since I can't reproduce this, there isn't anything else I can do. Maybe you can share a virtual machine or a desktop on the cloud that has this problem (something like https://www.macincloud.com/), or send me your laptop ;)

Did it generate the class in src_managed every time? I updated the test project to include using the generated proto message.

Some times it appears to fail silently where it doesn't output the class but it also doesn't say it failed.

I will try to check out protoc-birdge and if I can try to reproduce it directly using that.

As for an env, I'll see if I can come up with something. The mac is pretty straight forward, it just 10.14.5 with some stuff installed via home brew (mostly unix utils like tmux, zsh, etc). I wish I could ship you my whole laptop, I could use a newer one anyway ;)

Tried the latest updated version of your repo and I couldn't reproduce.

I see on your profile that you are in San Mateo, if you are ever in Mountain View/Cupertino, happy to take a look in person.

@matt-christiansen-exa , I added an integration test to protoc-bridge: https://github.com/scalapb/protoc-bridge/blob/master/src/test/scala/protocbridge/ProtocIntegrationSpec.scala

Can you clone this repo and run sbt test to see if you can get it to fail? If so, that would make it more convenient to debug what's happening since it all happens in a single repo.

I also added osx to our travis suite https://travis-ci.org/scalapb/protoc-bridge - if you can get it to fail there, it would be great way for me to look into it.

I am also experiencing this issue

Yes the integration test in protoc-bridge fails for me everytime I run sbt clean test

It fails with two errors:

The most common one is:

[info] ProtocIntegrationSpec:
[info] ProtocBridge.run
[info] - should invoke JVM and Java plugin properly *** FAILED ***
[info]   Stream() was not equal to List("test.proto:mytest.TestMsg", "test.proto:mytest.AnotherMsg") (ProtocIntegrationSpec.scala:59)
[info] ScalaTest
[info] Run completed in 908 milliseconds.

I got that 7 out of the 10 times I just ran it.

the other one was:

[info] ProtocIntegrationSpec:
[info] ProtocBridge.run
[info] - should invoke JVM and Java plugin properly *** FAILED ***
[info]   false was not true (ProtocIntegrationSpec.scala:58)

I did eventually get it to run successfully after about 20 runs, which is pretty consistent to my issue above (if i ran the generator a bunch of times eventually it worked)

Thanks for confirming. On the positive side we have a single test in a single repo that we need to get to pass. I am unable to reproduce this either locally nor on travis-ci though. It would be great if you can find time to dig into the code and debug this.

also not working for me and my team once we upgraded MacOS to 10.14.5, although does work on linux CI. I cloned master of protoc-bridge and ran sbt clean test and all seem to pass. Any suggestions?

Confirmed it's specific to mac os update. Just ran sbt protocGenerate on same project in Ubuntu VM and works as expected.

@aksharp I'll need help investigating this since I am unable to reproduce this on my own MBP. The general direction would be to add some debugging println's into https://github.com/scalapb/protoc-bridge/blob/master/src/main/scala/protocbridge/frontend/PosixPluginFrontend.scala , publish locally, add it as a library dependency in your project/build.sbt (not build.sbt), and go from there.

@aksharp @matt-christiansen-exa @TonySchulte : what JVM do you use (java -version). Can you think of other system info that can help us identify the problem?

Jdk 11 generating 2.12 sources on osx

On Jun 14, 2019 10:20 AM, Nadav Samet notifications@github.com wrote:

@aksharphttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_aksharp&d=DwMCaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=XS4P5JO9ADiSfYjPJyg-1e73dnlC-SLhyuZ74r_Kwm4&m=pr8tT-bTCEeED6MHD7wW52d71oTEX2wdFqPU-hejvbI&s=yuKxYmgZjaWO4hfbzMMUHqOw4f84SA_wUwOXaAoAg0U&e= @matt-christiansen-exahttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_matt-2Dchristiansen-2Dexa&d=DwMCaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=XS4P5JO9ADiSfYjPJyg-1e73dnlC-SLhyuZ74r_Kwm4&m=pr8tT-bTCEeED6MHD7wW52d71oTEX2wdFqPU-hejvbI&s=IDRk-lEUIXxAfLYj3KOquQjfjl_yyU6xovZKz78LzA4&e= @TonySchultehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_TonySchulte&d=DwMCaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=XS4P5JO9ADiSfYjPJyg-1e73dnlC-SLhyuZ74r_Kwm4&m=pr8tT-bTCEeED6MHD7wW52d71oTEX2wdFqPU-hejvbI&s=XPG9jo_61qm3kf92Fwsne8ZoWQGNqyAyIXSqVHWiUxI&e= : what JVM do you use (java -version). Can you think of other system info that can help us identify the problem?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_scalapb_ScalaPB_issues_594-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAKMQUEE7WBZTODQFJ6AQNDTP2PAKXA5CNFSM4HVZ7GGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXXIR5A-23issuecomment-2D502171892&d=DwMCaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=XS4P5JO9ADiSfYjPJyg-1e73dnlC-SLhyuZ74r_Kwm4&m=pr8tT-bTCEeED6MHD7wW52d71oTEX2wdFqPU-hejvbI&s=3adXIzUF_IBa-uJbKHl4qZHWftPKElt35RnZ3-gcKLg&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AKMQUEBZJY2UMUMPOEIJ32DP2PAKXANCNFSM4HVZ7GGA&d=DwMCaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=XS4P5JO9ADiSfYjPJyg-1e73dnlC-SLhyuZ74r_Kwm4&m=pr8tT-bTCEeED6MHD7wW52d71oTEX2wdFqPU-hejvbI&s=86IIeQNAuURitgrymOtgL2NsQnHU_iEnfATf5DVg4sE&e=.

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Ok, so I compiled, published local, added to project/build.sbt in my project

libraryDependencies ++=Seq(
  "com.thesamet.scalapb" %% "protoc-bridge" % "0.7.8-SNAPSHOT"
)

then ran sbt protocGenerate
All was successful, no errors
[success] Total time: 9 s, completed Jun 14, 2019 5:15:56 PM

However, target/src_managed/main/protobuf/ directory is empty!
Also, usually there's a list of proto file names and then output directory name, none of which was present in logs output

What else can I try to help?

Integration test passes for me, no errors

@aksharp Does protocGenerate prints that that invokes protoc? Does your main code reference the generated code? If it does, it is strange that the compilation succeeds if no code is generated.

Note that by default scalapb generates into target/src_managed/main/ not target/src_managed/main/protobuf

sbt protocGenerate succeeds without code being generated.
sbt compile fails because it references types which do not exist, because they were not generated

@aksharp, does it happen on https://github.com/matt-christiansen-exa/scalapb_594 as well? If not, can you share more about your project? Other source generators?

ok, just tried now with prior version

addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.18")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.7.4"
libraryDependencies += "com.thesamet.scalapb" %% "protoc-bridge" % "0.7.8-SNAPSHOT"

first time around by running sbt protocGenerate it generated code perfectly
second time around by running sbt clean protocGenerate it lists out proto files, but is stuck. SBT prompt shows (busy) >
third time around by running sbt clean protocGenerate it lists out proto files, not stuck, but nothing is generated. Directory created /target/scala-2.11/src_managed/main/ but it is empty

^^^ this is brand new project, no dependencies except for ScalaPB

created this demo project to demonstrate the above
https://github.com/aksharp/cos

^^^ can you clone it and run sbt protocGenerate on MacOS Mojave Version 10.14.5. Mine is MacBook Pro 2018 if that matters.

Also, I see another update that my mac wants to install:

MacBook Pro Supplemental Update   –– Restart Required

The MacBook Pro Supplemental Update addresses a firmware issue affecting 15-inch MacBook Pro computers with T2 Security Chip, and is recommended for all users.

I'll install, restart and try again.

After restart, on initial run

--scala_out: protoc-gen-scala: Plugin output is unparseable:....
....
[error] (compile:protocGenerate) protoc returned exit code: 1
[error] Total time: 1 s, completed Jun 14, 2019 8:55:34 PM

On next run sbt clean protocGenerate, again, nothing in folder, no error

λ ~/src/tmp/cos/target/scala-2.11/src_managed/main/ master ls -la
total 0
drwxr-xr-x  2 aksharp  1189473541  64 Jun 14 21:00 .
drwxr-xr-x  3 aksharp  1189473541  96 Jun 14 21:00 ..

@aksharp I am also on 10.14.5 with a 2018 MBP. Unfortunately, I couldn't reproduce this with the repo you created. I tried to publish an unmodified protoc-bridge locally for 2.10.x, and also comment out this line. Still works consistently.

Have you modified protoc-bridge in any way?

No, haven’t modified protocol-bridge

Couldn't reproduce it on an older 2013 MacBook running Mojave 10.14.5. I also signed to MacInCloud.com to get a more vanilla environment - the two example repos @akshap and @matt-christiansen-exa prepared work perfectly there. I'll have to rely on you to debug this at your environment or provide somehow access to your environment.

@thesamet sure, can do a call and share my screen. I am on eastern time zone. Let me know if you'd like to do that. I'll be available Monday.

@aksharp sure, let's coordinate over email. I can be reached with this handle at gmail.com. Also, to confirm can you reproduce this problem with https://github.com/matt-christiansen-exa/scalapb_594 ? The ScalaPB and sbt versions at aksharop/cos are old and certain bugs have been fixed since then.

I checked out scalapb_594 project and ran sbt protocGenerate. No errors, but nothing in src_managed/main dir.

Here's the full output:

λ /tmp/scalapb_594/ master sbt protocGenerate
[info] Loading global plugins from /Users/aksharp/.sbt/1.0/plugins
[info] Updating ProjectRef(uri("file:/Users/aksharp/.sbt/1.0/plugins/"), "global-plugins")...
[info] Done updating.
[info] Loading settings for project scalapb_594-build from plugins.sbt,scalapb.sbt ...
[info] Loading project definition from /private/tmp/scalapb_594/project
[info] Updating ProjectRef(uri("file:/private/tmp/scalapb_594/project/"), "scalapb_594-build")...
[info] downloading https://repo1.maven.org/maven2/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-api/2.4.0-b25/hk2-api-2.4.0-b25.jar ...
[info] downloading https://repo1.maven.org/maven2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar ...
[info] downloading https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit/4.9.0.201710071750-r/org.eclipse.jgit-4.9.0.201710071750-r.jar ...
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.2/asm-tree-5.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/eclipse/aether/aether-spi/0.9.0.M2/aether-spi-0.9.0.M2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.19/jersey-guava-2.19.jar ...
[info] downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.6.0/jackson-databind-2.6.0.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-locator/2.4.0-b25/hk2-locator-2.4.0-b25.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/hk2/external/javax.inject/2.4.0-b25/javax.inject-2.4.0-b25.jar ...
[info] downloading https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar ...
[info] downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.6.0/jackson-jaxrs-json-provider-2.6.0.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/jersey/connectors/jersey-apache-connector/2.19/jersey-apache-connector-2.19.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/jersey/media/jersey-media-json-jackson/2.19/jersey-media-json-jackson-2.19.jar ...
[info] downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-guava/2.6.0/jackson-datatype-guava-2.6.0.jar ...
[info] downloading https://repo1.maven.org/maven2/org/pantsbuild/jarjar/1.6.4/jarjar-1.6.4.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client/2.19/jersey-client-2.19.jar ...
[info] downloading https://repo1.maven.org/maven2/com/spotify/docker-client/3.5.13/docker-client-3.5.13.jar ...
[info] downloading https://repo1.maven.org/maven2/org/vafer/jdeb/1.3/jdeb-1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.2/asm-commons-5.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm/5.2/asm-5.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/eclipse/aether/aether-api/0.9.0.M2/aether-api-0.9.0.M2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-utils/2.4.0-b25/hk2-utils-2.4.0-b25.jar ...
[info] downloading https://repo1.maven.org/maven2/org/apache/maven/maven-aether-provider/3.2.2/maven-aether-provider-3.2.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/apache/maven/maven-repository-metadata/3.2.2/maven-repository-metadata-3.2.2.jar ...
[info] downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.6.0/jackson-module-jaxb-annotations-2.6.0.jar ...
[info] downloading https://repo1.maven.org/maven2/org/apache/maven/maven-settings-builder/3.2.2/maven-settings-builder-3.2.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/apache/maven/maven-settings/3.2.2/maven-settings-3.2.2.jar ...
[info] downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.6.0/jackson-core-2.6.0.jar ...
[info] downloading https://repo1.maven.org/maven2/org/eclipse/aether/aether-impl/0.9.0.M2/aether-impl-0.9.0.M2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/apache/maven/maven-core/3.2.2/maven-core-3.2.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/apache/maven/maven-model-builder/3.2.2/maven-model-builder-3.2.2.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common/2.19/jersey-common-2.19.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering/2.19/jersey-entity-filtering-2.19.jar ...
[info] downloading https://repo1.maven.org/maven2/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b25/aopalliance-repackaged-2.4.0-b25.jar ...
[info] downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.6.0/jackson-jaxrs-base-2.6.0.jar ...
[info]  [SUCCESSFUL ] org.ow2.asm#asm-tree;5.2!asm-tree.jar (74ms)
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/jars/sbt-git.jar ...
[info]  [SUCCESSFUL ] org.sonatype.plexus#plexus-sec-dispatcher;1.3!plexus-sec-dispatcher.jar (217ms)
[info]  [SUCCESSFUL ] org.glassfish.hk2.external#javax.inject;2.4.0-b25!javax.inject.jar (230ms)
[info]  [SUCCESSFUL ] com.fasterxml.jackson.jaxrs#jackson-jaxrs-base;2.6.0!jackson-jaxrs-base.jar(bundle) (233ms)
[info]  [SUCCESSFUL ] com.fasterxml.jackson.module#jackson-module-jaxb-annotations;2.6.0!jackson-module-jaxb-annotations.jar(bundle) (230ms)
[info]  [SUCCESSFUL ] org.glassfish.jersey.connectors#jersey-apache-connector;2.19!jersey-apache-connector.jar (237ms)
[info]  [SUCCESSFUL ] org.glassfish.hk2.external#aopalliance-repackaged;2.4.0-b25!aopalliance-repackaged.jar (235ms)
[info]  [SUCCESSFUL ] org.apache.maven#maven-aether-provider;3.2.2!maven-aether-provider.jar (237ms)
[info]  [SUCCESSFUL ] org.eclipse.aether#aether-spi;0.9.0.M2!aether-spi.jar (242ms)
[info]  [SUCCESSFUL ] org.apache.maven#maven-repository-metadata;3.2.2!maven-repository-metadata.jar (243ms)
[info]  [SUCCESSFUL ] org.codehaus.plexus#plexus-interpolation;1.19!plexus-interpolation.jar (260ms)
[info]  [SUCCESSFUL ] org.glassfish.jersey.media#jersey-media-json-jackson;2.19!jersey-media-json-jackson.jar (270ms)
[info]  [SUCCESSFUL ] com.fasterxml.jackson.jaxrs#jackson-jaxrs-json-provider;2.6.0!jackson-jaxrs-json-provider.jar(bundle) (270ms)
[info]  [SUCCESSFUL ] org.ow2.asm#asm-commons;5.2!asm-commons.jar (275ms)
[info]  [SUCCESSFUL ] org.sonatype.plexus#plexus-cipher;1.4!plexus-cipher.jar (267ms)
[info]  [SUCCESSFUL ] org.glassfish.jersey.ext#jersey-entity-filtering;2.19!jersey-entity-filtering.jar (269ms)
[info]  [SUCCESSFUL ] org.glassfish.hk2#hk2-api;2.4.0-b25!hk2-api.jar (271ms)
[info]  [SUCCESSFUL ] org.eclipse.aether#aether-util;0.9.0.M2!aether-util.jar (268ms)
[info]  [SUCCESSFUL ] org.apache.maven#maven-settings;3.2.2!maven-settings.jar (275ms)
[info]  [SUCCESSFUL ] com.fasterxml.jackson.datatype#jackson-datatype-guava;2.6.0!jackson-datatype-guava.jar(bundle) (281ms)
[info]  [SUCCESSFUL ] org.pantsbuild#jarjar;1.6.4!jarjar.jar (286ms)
[info]  [SUCCESSFUL ] org.apache.maven#maven-settings-builder;3.2.2!maven-settings-builder.jar (279ms)
[info]  [SUCCESSFUL ] org.eclipse.aether#aether-impl;0.9.0.M2!aether-impl.jar (281ms)
[info]  [SUCCESSFUL ] com.googlecode.javaewah#JavaEWAH;1.1.6!JavaEWAH.jar(bundle) (279ms)
[info]  [SUCCESSFUL ] org.ow2.asm#asm;5.2!asm.jar (289ms)
[info]  [SUCCESSFUL ] org.eclipse.aether#aether-api;0.9.0.M2!aether-api.jar (291ms)
[info]  [SUCCESSFUL ] org.apache.maven#maven-model-builder;3.2.2!maven-model-builder.jar (293ms)
[info]  [SUCCESSFUL ] com.spotify#docker-client;3.5.13!docker-client.jar (307ms)
[info]  [SUCCESSFUL ] org.glassfish.hk2#hk2-utils;2.4.0-b25!hk2-utils.jar (304ms)
[info]  [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-core;2.6.0!jackson-core.jar(bundle) (304ms)
[info]  [SUCCESSFUL ] org.glassfish.hk2#hk2-locator;2.4.0-b25!hk2-locator.jar (307ms)
[info]  [SUCCESSFUL ] org.glassfish.jersey.core#jersey-client;2.19!jersey-client.jar (308ms)
[info]  [SUCCESSFUL ] org.glassfish.jersey.core#jersey-common;2.19!jersey-common.jar (312ms)
[info]  [SUCCESSFUL ] org.glassfish.jersey.bundles.repackaged#jersey-guava;2.19!jersey-guava.jar(bundle) (341ms)
[info]  [SUCCESSFUL ] org.apache.maven#maven-core;3.2.2!maven-core.jar (378ms)
[info]  [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-databind;2.6.0!jackson-databind.jar(bundle) (469ms)
[info]  [SUCCESSFUL ] org.vafer#jdeb;1.3!jdeb.jar (503ms)
[info]  [SUCCESSFUL ] org.eclipse.jgit#org.eclipse.jgit;4.9.0.201710071750-r!org.eclipse.jgit.jar (643ms)
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/io.spray/sbt-revolver/scala_2.12/sbt_1.0/0.9.1/jars/sbt-revolver.jar ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.2.2/jars/sbt-native-packager.jar ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.14.5/jars/sbt-assembly.jar ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.github.gseitz/sbt-release/scala_2.12/sbt_1.0/1.0.9/jars/sbt-release.jar ...
[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-git;1.0.0!sbt-git.jar (1155ms)
[info]  [SUCCESSFUL ] io.spray#sbt-revolver;0.9.1!sbt-revolver.jar (1203ms)
[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-native-packager;1.2.2!sbt-native-packager.jar (1383ms)
[info]  [SUCCESSFUL ] com.eed3si9n#sbt-assembly;0.14.5!sbt-assembly.jar (1422ms)
[info]  [SUCCESSFUL ] com.github.gseitz#sbt-release;1.0.9!sbt-release.jar (1776ms)
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Loading settings for project scalapb_594 from version.sbt,build.sbt ...
[info] Set current project to test-service (in build file:/private/tmp/scalapb_594/)
[info] Updating ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-http_2.12/10.1.3/akka-http_2.12-10.1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-http-spray-json_2.12/10.1.3/akka-http-spray-json_2.12-10.1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-http-testkit_2.12/10.1.3/akka-http-testkit_2.12-10.1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-slf4j_2.12/2.5.3/akka-slf4j_2.12-2.5.3.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.12/2.5.12/akka-actor_2.12-2.5.12.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-stream-testkit_2.12/2.5.12/akka-stream-testkit_2.12-2.5.12.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-testkit_2.12/2.5.12/akka-testkit_2.12-2.5.12.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf_2.12/2.5.12/akka-protobuf_2.12-2.5.12.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-stream_2.12/2.5.12/akka-stream_2.12-2.5.12.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/ssl-config-core_2.12/0.2.3/ssl-config-core_2.12-0.2.3.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-parsing_2.12/10.1.3/akka-parsing_2.12-10.1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-http-core_2.12/10.1.3/akka-http-core_2.12-10.1.3.jar ...
[info] downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.23/slf4j-api-1.7.23.jar ...
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-http-spray-json_2.12;10.1.3!akka-http-spray-json_2.12.jar (57ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-slf4j_2.12;2.5.3!akka-slf4j_2.12.jar (183ms)
[info]  [SUCCESSFUL ] org.slf4j#slf4j-api;1.7.23!slf4j-api.jar (219ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-stream-testkit_2.12;2.5.12!akka-stream-testkit_2.12.jar (225ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-http-testkit_2.12;10.1.3!akka-http-testkit_2.12.jar (234ms)
[info]  [SUCCESSFUL ] com.typesafe#ssl-config-core_2.12;0.2.3!ssl-config-core_2.12.jar(bundle) (272ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-testkit_2.12;2.5.12!akka-testkit_2.12.jar (312ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-parsing_2.12;10.1.3!akka-parsing_2.12.jar (333ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-protobuf_2.12;2.5.12!akka-protobuf_2.12.jar (374ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-http_2.12;10.1.3!akka-http_2.12.jar (595ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-actor_2.12;2.5.12!akka-actor_2.12.jar (613ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-stream_2.12;2.5.12!akka-stream_2.12.jar (652ms)
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-http-core_2.12;10.1.3!akka-http-core_2.12.jar (1037ms)
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Compiling 1 protobuf files to /private/tmp/scalapb_594/target/scala-2.12/src_managed/main
[info] Compiling schema /private/tmp/scalapb_594/src/main/protobuf/testmsg.proto
protoc-jar: protoc version: 3.7.1, detected platform: osx-x86_64 (mac os x/x86_64)
protoc-jar: embedded: bin/3.7.1/protoc-3.7.1-osx-x86_64.exe
protoc-jar: executing: [/var/folders/yb/q_wc6f9d6hv7q0ynqw57qpp1sfxbjh/T/protocjar8223689460384579866/bin/protoc.exe, --plugin=protoc-gen-scala=/var/folders/yb/q_wc6f9d6hv7q0ynqw57qpp1sfxbjh/T/protocbridge7563862631637331156, --scala_out=grpc:/private/tmp/scalapb_594/target/scala-2.12/src_managed/main, -I/private/tmp/scalapb_594/src/main/protobuf, -I/private/tmp/scalapb_594/target/protobuf_external, -I/private/tmp/scalapb_594/src/main/protobuf, -I/private/tmp/scalapb_594/target/protobuf_external, /private/tmp/scalapb_594/src/main/protobuf/testmsg.proto]
[info] Compiling protobuf
[info] Protoc target directory: /private/tmp/scalapb_594/target/scala-2.12/src_managed/main
[success] Total time: 4 s, completed Jun 16, 2019 10:41:45 AM
λ /tmp/scalapb_594/ master cd /private/tmp/scalapb_594/target/scala-2.12/src_managed/main
λ /private/tmp/scalapb_594/target/scala-2.12/src_managed/main/ master ls -la
total 0
drwxr-xr-x  2 aksharp  wheel    64B Jun 16 10:41 .
drwxr-xr-x  3 aksharp  wheel    96B Jun 16 10:41 ..

Thanks @aksharp for the video call this morning and for debugging this with me!

I released protoc-bridge that is expected to fix this issue. You can try it by including the following in your project/build.sbt (not build.sbt):

libraryDependencies += "com.thesamet.scalapb" %% "protoc-bridge" % "0.7.8"

When the next release of ScalaPB's compiler plugin comes out you will be able to remove this line, since you'll get this version of protoc-bridge (or newer) transitively.

It would be great if you can report that it resolves this issue for you.

Thanks for your help @thesamet Verified that it works by running sbt protocGenerate and now there are generated files in src_managed/main directory.

I released sbt-protoc version 0.99.23 which depends on the updated protoc-bridge, so upgrading to that version would be sufficient (without the explicit dependency on protoc-bridge).

With the updated sbt-protoc I cannot reproduce the problem anymore.

I consider this issue resolved then! Thanks for reporting this issue and providing a test project. Please feel free to report if anything else comes up in the future.

Was this page helpful?
0 / 5 - 0 ratings