Skip to content

Commit

Permalink
another workaround for ScalaPB EnumType issue
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw committed Oct 16, 2023
1 parent 9743d3f commit 1adb40e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ lazy val interopTests = Project(id = "akka-grpc-interop-tests", base = file("int
ReflectiveCodeGen.extraGenerators := Seq("ScalaMarshallersCodeGenerator"),
ReflectiveCodeGen.codeGeneratorSettings ++= Seq("server_power_apis"),
// grpc-interop pulls in proto files with unfulfilled transitive deps it seems
PB.generate / excludeFilter := new SimpleFileFilter((f: File) => f.getParent.contains("envoy")),
// FIXME descriptor.proto is excluded because of EnumType issue https://github.com/scalapb/ScalaPB/issues/1557
PB.generate / excludeFilter := new SimpleFileFilter((f: File) =>
f.getAbsolutePath.endsWith("google/protobuf/descriptor.proto") ||
f.getParent.contains("envoy")),
PB.protocVersion := Dependencies.Versions.googleProtobuf,
// This project should use 'publish/skip := true', but we need
// to be able to `publishLocal` to run the interop tests as an
Expand Down
5 changes: 1 addition & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ object Dependencies {
val akkaHttpBinary = "10.6"

val grpc = "1.58.0" // checked synced by VersionSyncCheckPlugin
// FIXME should be same as `grpc` but due to https://github.com/scalapb/ScalaPB/issues/1557
// we are testing with an older version that doesn't expose that problem.
val grpcInterop = "1.54.2"

// Even referenced explicitly in the sbt-plugin's sbt-tests
// If changing this, remember to update protoc plugin version to align in
Expand Down Expand Up @@ -61,7 +58,7 @@ object Dependencies {

// Excluding grpc-alts works around a complex resolution bug
// Details are in https://github.com/akka/akka-grpc/pull/469
val grpcInteropTesting = ("io.grpc" % "grpc-interop-testing" % Versions.grpcInterop)
val grpcInteropTesting = ("io.grpc" % "grpc-interop-testing" % Versions.grpc)
.exclude("io.grpc", "grpc-alts")
.exclude("io.grpc", "grpc-xds")

Expand Down
7 changes: 5 additions & 2 deletions sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ enablePlugins(AkkaGrpcPlugin)
// They have different "java_outer_classname" options, but scalapb does not look at it:
// https://github.com/scalapb/ScalaPB/issues/243#issuecomment-279769902
// Therefore we exclude it here.
// FIXME descriptor.proto is excluded because of EnumType issue https://github.com/scalapb/ScalaPB/issues/1557
PB.generate / excludeFilter := new SimpleFileFilter((f: File) =>
f.getAbsolutePath.endsWith("google/protobuf/descriptor.proto") ||
f.getAbsolutePath.endsWith("google/protobuf/empty.proto") ||
// grpc-interop pulls in proto files with unfulfilled transitive deps it seems, so skip them as well
f.getParent.contains("envoy"))
// grpc-interop pulls in proto files with unfulfilled transitive deps it seems, so skip them as well
f.getParent.contains("envoy")
)

//#sources-both
// This is the default - both client and server
Expand Down

0 comments on commit 1adb40e

Please sign in to comment.