You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2024/10/28 20:50:24 UTC
(pekko-persistence-r2dbc) branch main updated: Setup MiMa checks (#166)
This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-r2dbc.git
The following commit(s) were added to refs/heads/main by this push:
new bfc71f8 Setup MiMa checks (#166)
bfc71f8 is described below
commit bfc71f89848119e301fd4c3ca6f8382618be40e8
Author: Domantas Petrauskas <58...@users.noreply.github.com>
AuthorDate: Mon Oct 28 22:50:18 2024 +0200
Setup MiMa checks (#166)
* Setup MiMa checks
* Address PR comments
* Address PR comments
---
.github/workflows/binary-compatibility-checks.yml | 47 ++++++++++++++++++++++
build.sbt | 12 +++++-
project/plugins.sbt | 1 +
.../1.0.x.backwards.excludes/r2dbcsession.excludes | 20 +++++++++
4 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/binary-compatibility-checks.yml b/.github/workflows/binary-compatibility-checks.yml
new file mode 100644
index 0000000..ee9024e
--- /dev/null
+++ b/.github/workflows/binary-compatibility-checks.yml
@@ -0,0 +1,47 @@
+name: Binary Compatibility
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+permissions: {}
+
+jobs:
+ check-binary-compatibility:
+ name: Check / Binary Compatibility
+ runs-on: ubuntu-22.04
+ if: github.repository == 'apache/pekko-persistence-r2dbc'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: 0
+
+ - name: Setup Java 11
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: 11
+
+ - name: Install sbt
+ uses: sbt/setup-sbt@v1
+
+ - name: Cache Coursier cache
+ uses: coursier/cache-action@v6
+
+ - name: Enable jvm-opts
+ run: cp .jvmopts-ci .jvmopts
+
+ - name: Compile code
+ run: sbt +compile
+
+ - name: Report MiMa Binary Issues
+ run: |-
+ sbt +mimaReportBinaryIssues
+
+ - name: Check correct MiMa filter directories
+ run: |
+ sbt checkMimaFilterDirectories
diff --git a/build.sbt b/build.sbt
index a5951f4..c8c9d05 100644
--- a/build.sbt
+++ b/build.sbt
@@ -41,6 +41,7 @@ inThisBuild(
lazy val dontPublish = Seq(publish / skip := true, Compile / publishArtifact := false)
lazy val root = (project in file("."))
+ .disablePlugins(MimaPlugin)
.settings(dontPublish)
.settings(
name := "pekko-persistence-r2dbc-root")
@@ -70,12 +71,21 @@ lazy val migration = (project in file("migration"))
dependencyOverrides ++= Dependencies.pekkoTestDependencyOverrides,
Test / mainClass := Some("org.apache.pekko.persistence.r2dbc.migration.MigrationTool"),
Test / run / fork := true,
- Test / run / javaOptions += "-Dlogback.configurationFile=logback-main.xml")
+ Test / run / javaOptions += "-Dlogback.configurationFile=logback-main.xml",
+ mimaPreviousArtifacts := {
+ CrossVersion.partialVersion(scalaVersion.value) match {
+ case Some((3, _)) =>
+ Set.empty
+ case _ =>
+ mimaPreviousArtifacts.value
+ }
+ })
.dependsOn(core % "compile->compile;test->test")
lazy val docs = project
.in(file("docs"))
.enablePlugins(PekkoParadoxPlugin, ParadoxSitePlugin, ScalaUnidocPlugin)
+ .disablePlugins(MimaPlugin)
.dependsOn(core, projection, migration)
.settings(dontPublish)
.settings(
diff --git a/project/plugins.sbt b/project/plugins.sbt
index e1b5b63..c7d7e0b 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -11,6 +11,7 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") // for maintenance o
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.8.0")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
+addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
// for releasing
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.0")
diff --git a/projection/src/main/mima-filters/1.0.x.backwards.excludes/r2dbcsession.excludes b/projection/src/main/mima-filters/1.0.x.backwards.excludes/r2dbcsession.excludes
new file mode 100644
index 0000000..de0fbe3
--- /dev/null
+++ b/projection/src/main/mima-filters/1.0.x.backwards.excludes/r2dbcsession.excludes
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Caused by https://github.com/apache/pekko-persistence-r2dbc/pull/101
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.projection.r2dbc.javadsl.R2dbcSession.updateOne")
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.projection.r2dbc.javadsl.R2dbcSession.update")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org