akka-grpc
akka-grpc copied to clipboard
IDE support in IntelliJ
In #243 I added support for eclipse to pick up/understand that the akka-grpc plugin is part of a maven build and is a source code generator that needs to be run to build the project.
Is there something like that which makes IntelliJ understand that "rebuild project" should also trigger compilation of the proto-files?
For sbt: https://youtrack.jetbrains.com/issue/SCL-9301#comment=27-2041907
Using sbt-shell when importing a project will supposedly make IntelliJ compile through sbt triggering the protobuf compilation on "Build project"
Any updates on this?
No specific work on the Akka gRPC side.
Quite some time has passed since I opened this issue though, so there has been a number of IntelliJ releases since, not sure if anything improved in IntelliJ wrt to this, or some other changes to how the generation is hooked into the respective build tools that could make IntelliJ pick it up/understand that it is a generator better.
It's really surprising no one has found a work around for this considering intellij is one of the more popular IDEs for development in Scala.
It's really surprising no one has found a work around for this considering intellij is one of the more popular IDEs for development in Scala.
I think the workaround is to use sbt and IntelliJ side-by-side - IIRC once sbt has compiled the project then doing further development in IntelliJ mostly works, right? So once someone is used to that workflow it becomes less urgent to improve the integration.
I agree "properly" fixing this would be great, though!
Yeah, that seems to be true in our case.
I have limited understanding of grpc, but it seems we need to
- Execute the protobuf generation
- Actually compile all source code
I'm trying to understand what the command is that does (1) so that I might be able to work around this problem by manually defining the ordering
I'm trying to understand what the command is that does (1)
I think that should be sbt protocGenerate
so that I might be able to work around this problem by manually defining the ordering
Well, the ordering should already be there though... from the start of this thread I had the impression that it might have been some caching issue? I also know several things have changed in this area in sbt-protoc, though, so that might no longer be up-to-date.
I'm trying to understand what the command is that does (1)
I think that should be
sbt protocGenerateso that I might be able to work around this problem by manually defining the ordering
Well, the ordering should already be there though... from the start of this thread I had the impression that it might have been some caching issue? I also know several things have changed in this area in sbt-protoc, though, so that might no longer be up-to-date.
You likely have a better idea of what is going on than i do frankly :joy:
I'll look into this later again, if you are curious the project in reference is lnd-rpc on bitcoin-s:
https://github.com/bitcoin-s/bitcoin-s/tree/master/lnd-rpc
At least a little bit surprising that the IntelliJ sbt integration does not pick up that there are sourceGenerators defined for a project (https://github.com/thesamet/sbt-protoc/blob/master/src/main/scala/sbtprotoc/ProtocPlugin.scala#L335) but maybe that is not a general concept that IntelliJ handles.
At least a little bit surprising that the IntelliJ sbt integration does not pick up that there are
sourceGeneratorsdefined for a project (https://github.com/thesamet/sbt-protoc/blob/master/src/main/scala/sbtprotoc/ProtocPlugin.scala#L335) but maybe that is not a general concept that IntelliJ handles.
It is very possible that i am missing something since this is a submodule, but we do add it in .aggregate() and .dependsOn() for the root project