Closed onsails closed 9 years ago
Basically protoc is not finding the import. You can try appending to the includePath so it searches for it:
includePath ++= Seq("../foo/bar")
Thank you for quick response! It worked: https://github.com/actorapp/actor-platform/commit/83d920055784981582e718936a78d777b0d15364
I got here from Google trying to figure out this exact issue. The answer has changed since it was posted now that ScalaPB is using the sbt-protoc plugin. The incantation that worked for me was:
PB.includePaths in Compile += file("../foo/bar")
Hello!
We have an SBT project which consists of lots of sbt subprojects: https://github.com/actorapp/actor-platform/blob/server/event-sourcing/actor-server/project/Build.scala#L199 A project
actorPeerManager
hasuser.proto
andsequence.proto
. We need to movesequence.proto
to another projectactorPush
to be able to sharesequence.proto
with other projects dependant onactorPush
too. But here is a problem.Plugin diesn't extract
sequence.proto
, anduser.proto
which containsimport "sequence.proto"
doesn't compile with an errorsequence.proto: File not found.
.I've tried several ways to beat this problems: added
.aggregate(actorPush)
toactorPeerManagers
, addedunmanagedResourceDirectories in Compile <+= (sourceDirectory in PB.protobufConfig)
as follows sbt-protobuf readme, experimented withmanagedClasspath
setting but still no luck.Is there a way to depend on
.proto
files from another sbt project?