-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output directory conflicts with IntelliJ #37
Comments
Can you try setting "scalaSource in PB.protobufConfig", that should do it. On Thu, Aug 27, 2015 at 12:37 PM, jportway [email protected] wrote:
|
That worked. Brilliant! Thank you. |
@jportway would you mind posting exactly what you did to which build files? I tried adding scalaSource in PB.protobufConfig <<= (sourceManaged / "main") to my (It doesn't help that I'm new to SBT, having built all my Scala projects with Gradle till now.) |
@nadavsr When you said : "Can you try setting "scalaSource in PB.protobufConfig", that should do it.", what do you mean exactly? Setting it with what values? |
This is how I configured it to work with InteliJ
|
I tried the same, but for whatever reason in IntelliJ protobufConfig shows in red, as if it's not a member of PB ... any idea(pun not intended) why ? |
Are you using |
In plugins.sbt I have addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.1") libraryDependencies += "com.trueaccord.scalapb" %% "compilerplugin" % "0.5.42" In build.sbt I have When I try to add the advised line in build.sbt, the .protobufConfig is red, assume somehow IntelliJ doesn't sees it as a member of PB ... what am I doing wrong ? |
In NOTE: in sbt-protoc there's something called |
I'm trying to get visibility of the generated classes in the project. As it is right now, all classes are shown in red, as they're not defined. Compiling via sbt works. But it's a nuisance to not be able to see class members in IntelliJ |
Try importing the project to IntelliJ now that you have a few proto files. It looks like if there are no protocol buffers at the time the IntelliJ project is created it will not find the generated sources. |
I'll try that, thank you |
For those still having the issue, I made it work with
|
When IntelliJ imports an SBT project using the ScalaPB plugin it adds both directories:
"src_managed / main" and "src_managed / main / compiled_protobuf" to it's internal build system.
So when you build the project with IntelliJ the generated classes get included twice, causing conflicts.
is it possible to build directly into the "src_managed / main" directory ?
sbt-protobuf has some instructions about this, but it's not obvious how they map to ScalaPB.
The text was updated successfully, but these errors were encountered: