Skip to content

Commit

Permalink
bump sbt-protoc for better integration with common-protos
Browse files Browse the repository at this point in the history
Fixes scripted 10-scalapb-validate, see
* scalapb/ScalaPB#873 (comment)
* scalapb/scalapb-validate#70

Other changes
* cacheClassLoaders is now deprecated, see
  thesamet/sbt-protoc@2a730a4
* The new classloader caching implementation resolves sandboxed
  generators artifacts earlier, even if they are no sources. That is
  the case for Test / protocGenerate, which was starting before
  codeGenProject / Compile / publishLocal, causing:
  > Error downloading com.lightbend.akka.grpc:akka-grpc-codegen_2.12:
  > 1.1.0-5-c5975cd5
  • Loading branch information
github-brice-jaglin committed Feb 15, 2021
1 parent 70ba7a2 commit 9fb3944
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmark-java/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val root = project.in(file("."))
"org.scalatest" %% "scalatest" % "3.1.2" % "test",
"org.scalatestplus" %% "junit-4-12" % "3.1.2.0" % "test"
),
Compile / PB.generate := ((Compile / PB.generate) dependsOn (
PB.artifactResolver := (PB.artifactResolver dependsOn (
codeGenProject / Compile / publishLocal)).value
)

Expand Down
2 changes: 0 additions & 2 deletions project/ReflectiveCodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ object ReflectiveCodeGen extends AutoPlugin {
}
}
}.value,
// Reload generators on each invocation
PB.cacheClassLoaders := false,
setCodeGenerator := loadAndSetGenerator(
// the magic sauce: use the output classpath from the the sbt-plugin project and instantiate generators from there
(fullClasspath in Compile in ProjectRef(file("."), "sbt-akka-grpc")).value,
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
enablePlugins(BuildInfoPlugin)

val sbtProtocV = "1.0.0"
val sbtProtocV = "1.0.1"

buildInfoKeys := Seq[BuildInfoKey]("sbtProtocVersion" -> sbtProtocV)

Expand Down

0 comments on commit 9fb3944

Please sign in to comment.