Skip to content
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

Protobuf4 experiment #371

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .scala-steward.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ updates.pin = [

# Scala 3.3 is a LTS
{ groupId = "org.scala-lang", artifactId = "scala3-library", version = "3.3." }
# when we update to protobuf 4.x we probably need to update a bunch of libraries
# in tandem, and possibly schedule this for a major pekko-grpc release
{ groupId = "com.google.protobuf", version = "3." }

# Issues when using GRPC 1.68+ - https://github.com/apache/pekko-grpc/pull/397
{ groupId = "io.grpc", version = "1.67." }
Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ sourceDistName := "apache-pekko-grpc"
sourceDistIncubating := false
ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec)
ThisBuild / resolvers += Resolver.ApacheMavenStagingRepo
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots")

commands := commands.value.filterNot { command =>
command.nameOption.exists { name =>
Expand Down Expand Up @@ -291,6 +292,7 @@ lazy val pluginTesterScala = Project(id = "plugin-tester-scala", base = file("pl
fork := true,
crossScalaVersions := Dependencies.Versions.CrossScalaForLib,
scalaVersion := scala212,
PB.protocVersion := Dependencies.Versions.googleProtoc,
ReflectiveCodeGen.codeGeneratorSettings ++= Seq("flat_package", "server_power_apis"))
.pluginTestingSettings
.enablePlugins(NoPublish)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.gradle.api.Project

class PekkoGrpcPluginExtension {

static final String PROTOC_VERSION = "3.25.5" // checked synced by VersionSyncCheckPlugin
static final String PROTOC_VERSION = "4.28.2" // checked synced by VersionSyncCheckPlugin

static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12"

Expand Down
4 changes: 2 additions & 2 deletions maven-plugin/src/main/maven/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<extraGenerators implementation="java.util.List" default-value=""/>
<protoPaths default-value="${project.basedir}/src/main/proto,${project.basedir}/src/main/protobuf">${pekko-grpc.protoPaths}</protoPaths>
<outputDirectory default-value="${project.build.directory}/generated-sources">${pekko-grpc.outputDirectory}</outputDirectory>
<protocVersion implementation="java.lang.String" default-value="-v3.25.5">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<protocVersion implementation="java.lang.String" default-value="-v4.28.2">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<includeStdTypes implementation="boolean" default-value="false" />
</configuration>
</mojo>
Expand Down Expand Up @@ -187,7 +187,7 @@
<extraGenerators implementation="java.util.List" default-value=""/>
<protoPaths default-value="src/test/proto,src/test/protobuf">${pekko-grpc.protoPaths}</protoPaths>
<outputDirectory default-value="target/generated-test-sources">${pekko-grpc.outputDirectory}</outputDirectory>
<protocVersion implementation="java.lang.String" default-value="-v3.25.5">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<protocVersion implementation="java.lang.String" default-value="-v4.28.2">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<includeStdTypes implementation="boolean" default-value="false" />
</configuration>
</mojo>
Expand Down
1 change: 1 addition & 0 deletions plugin-tester-scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}"
dependencies {
implementation "org.apache.pekko:pekko-http-cors_${scalaBinaryVersion}:1.1.0"
implementation "org.scala-lang:scala-library:${scalaFullVersion}"
implementation 'com.google.protobuf:protobuf-java:4.28.2'
testImplementation "org.apache.pekko:pekko-stream-testkit_${scalaBinaryVersion}:1.1.2"
testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.2.19"
testImplementation "org.scalatestplus:junit-4-13_${scalaBinaryVersion}:3.2.19.0"
Expand Down
5 changes: 3 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ object Dependencies {
// Even referenced explicitly in the sbt-plugin's sbt-tests
// If changing this, remember to update protoc plugin version to align in
// maven-plugin/src/main/maven/plugin.xml and org.apache.pekko.grpc.sbt.PekkoGrpcPlugin
val googleProtoc = "3.25.5" // checked synced by VersionSyncCheckPlugin
val googleProtobufJava = "3.25.5"
val googleProtobufJava = "4.28.2"
val googleProtoc = googleProtobufJava // checked synced by VersionSyncCheckPlugin

val scalaTest = "3.2.19"

Expand Down Expand Up @@ -130,5 +130,6 @@ object Dependencies {
Compile.grpcStub,
Test.scalaTest,
Test.scalaTestPlusJunit,
Protobuf.protobufJava,
Protobuf.googleCommonProtos)
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.2024011
// scripted testing
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.17"
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "1.0.0-alpha.1"
Loading