This is an automated email from the ASF dual-hosted git repository.

mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-connectors.git


The following commit(s) were added to refs/heads/main by this push:
     new c41a9f376 Finish Scala 2.12 support
c41a9f376 is described below

commit c41a9f376a3e9cfd6591bb13116640f49226bc25
Author: Matthew de Detrich <[email protected]>
AuthorDate: Tue Mar 21 10:33:20 2023 +0100

    Finish Scala 2.12 support
---
 .github/workflows/check-build-test.yml                        |  2 +-
 build.sbt                                                     | 11 +++++++++--
 csv/src/test/scala/docs/scaladsl/CsvParsingSpec.scala         |  1 +
 file/src/test/scala/docs/scaladsl/ExecutableUtils.scala       |  4 +++-
 .../src/test/scala/docs/scaladsl/GoogleCommonDoc.scala        |  3 +--
 .../pekko/stream/connectors/kinesis/KinesisFlowSpec.scala     |  7 +++++--
 project/Dependencies.scala                                    |  2 +-
 .../org/apache/pekko/stream/connectors/reference/model.scala  |  1 +
 .../stream/connectors/reference/testkit/MessageFactory.scala  |  1 +
 9 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/check-build-test.yml 
b/.github/workflows/check-build-test.yml
index 3d61fe9e9..eda2a04eb 100644
--- a/.github/workflows/check-build-test.yml
+++ b/.github/workflows/check-build-test.yml
@@ -42,7 +42,7 @@ jobs:
 
       # temporarily remove mima checks
       - name: "Code style, compile tests, MiMa. Run locally with: sbt +~2.13 
\"headerCheckAll; verifyCodeFmt; Test/compile; mimaReportBinaryIssues\""
-        run: sbt +~2.13 "headerCheckAll; verifyCodeFmt; Test/compile"
+        run: sbt "headerCheckAll; verifyCodeFmt; +Test/compile"
 
   documentation:
     name: ScalaDoc, Documentation with Paradox
diff --git a/build.sbt b/build.sbt
index 64ff5588e..a63073899 100644
--- a/build.sbt
+++ b/build.sbt
@@ -153,8 +153,15 @@ lazy val geode =
     "geode",
     Dependencies.Geode,
     Test / fork := true,
-    // https://github.com/scala/bug/issues/12072
-    Test / scalacOptions += "-Xlint:-byname-implicit")
+    Test / scalacOptions ++= {
+      CrossVersion.partialVersion(scalaVersion.value) match {
+        case Some((2, n)) if n == 13 =>
+          // https://github.com/scala/bug/issues/12072
+          List("-Xlint:-byname-implicit")
+        case Some((2, n)) if n == 12 =>
+          List.empty
+      }
+    })
 
 lazy val googleCommon = pekkoConnectorProject(
   "google-common",
diff --git a/csv/src/test/scala/docs/scaladsl/CsvParsingSpec.scala 
b/csv/src/test/scala/docs/scaladsl/CsvParsingSpec.scala
index 055a63556..85571d14d 100644
--- a/csv/src/test/scala/docs/scaladsl/CsvParsingSpec.scala
+++ b/csv/src/test/scala/docs/scaladsl/CsvParsingSpec.scala
@@ -21,6 +21,7 @@ import pekko.stream.connectors.csv.scaladsl.{ CsvParsing, 
CsvToMap }
 import pekko.stream.scaladsl.{ FileIO, Flow, Keep, Sink, Source }
 import pekko.stream.testkit.scaladsl.StreamTestKit.assertAllStagesStopped
 import pekko.stream.testkit.scaladsl.{ TestSink, TestSource }
+import pekko.util.ccompat._
 import pekko.util.ByteString
 
 import scala.collection.immutable.Seq
diff --git a/file/src/test/scala/docs/scaladsl/ExecutableUtils.scala 
b/file/src/test/scala/docs/scaladsl/ExecutableUtils.scala
index 78dda2235..8baf7fec8 100644
--- a/file/src/test/scala/docs/scaladsl/ExecutableUtils.scala
+++ b/file/src/test/scala/docs/scaladsl/ExecutableUtils.scala
@@ -18,6 +18,7 @@ import java.nio.file.{ Files, Path, Paths }
 
 import org.apache.pekko.util.ByteString
 
+import scala.annotation.nowarn
 import scala.concurrent.Future
 import scala.sys.process.{ BasicIO, Process }
 
@@ -57,9 +58,10 @@ object ExecutableUtils {
     finally stream.close()
   }
 
+  @nowarn("msg=deprecated")
   private def readStream(stream: InputStream): ByteString = {
     val reader = new BufferedInputStream(stream)
-    try ByteString(LazyList.continually(reader.read).takeWhile(_ != 
-1).map(_.toByte).toArray)
+    try ByteString(Stream.continually(reader.read).takeWhile(_ != 
-1).map(_.toByte).toArray)
     finally reader.close()
   }
 
diff --git a/google-common/src/test/scala/docs/scaladsl/GoogleCommonDoc.scala 
b/google-common/src/test/scala/docs/scaladsl/GoogleCommonDoc.scala
index b354ef72f..774be7cbc 100644
--- a/google-common/src/test/scala/docs/scaladsl/GoogleCommonDoc.scala
+++ b/google-common/src/test/scala/docs/scaladsl/GoogleCommonDoc.scala
@@ -21,8 +21,7 @@ import pekko.stream.scaladsl.Source
 
 import scala.annotation.nowarn
 
-@nowarn("msg=never used")
-@nowarn("msg=dead code")
+@nowarn("msg=never used|dead code")
 class GoogleCommonDoc {
 
   implicit val system: ActorSystem = ???
diff --git 
a/kinesis/src/test/scala/org/apache/pekko/stream/connectors/kinesis/KinesisFlowSpec.scala
 
b/kinesis/src/test/scala/org/apache/pekko/stream/connectors/kinesis/KinesisFlowSpec.scala
index bb7a02416..7e08e3b07 100644
--- 
a/kinesis/src/test/scala/org/apache/pekko/stream/connectors/kinesis/KinesisFlowSpec.scala
+++ 
b/kinesis/src/test/scala/org/apache/pekko/stream/connectors/kinesis/KinesisFlowSpec.scala
@@ -33,6 +33,8 @@ import org.scalatest.matchers.should.Matchers
 import software.amazon.awssdk.core.SdkBytes
 import software.amazon.awssdk.services.kinesis.model._
 
+import scala.annotation.nowarn
+
 class KinesisFlowSpec extends AnyWordSpec with Matchers with KinesisMock with 
LogCapturing {
 
   "KinesisFlow" must {
@@ -101,9 +103,10 @@ class KinesisFlowSpec extends AnyWordSpec with Matchers 
with KinesisMock with Lo
         .run()
   }
 
+  @nowarn("msg=deprecated")
   trait KinesisFlowWithContextProbe { self: Settings =>
     val streamName = "stream-name"
-    val recordStream = LazyList
+    val recordStream = Stream
       .from(1)
       .map(i =>
         (PutRecordsRequestEntry
@@ -112,7 +115,7 @@ class KinesisFlowSpec extends AnyWordSpec with Matchers 
with KinesisMock with Lo
             .data(SdkBytes.fromByteBuffer(ByteString(i).asByteBuffer))
             .build(),
           i))
-    val resultStream = LazyList
+    val resultStream = Stream
       .from(1)
       .map(i => (PutRecordsResultEntry.builder().build(), i))
 
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 87953ad36..57662e033 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -121,7 +121,7 @@ object Dependencies {
     libraryDependencies ++= Seq(
       "org.apache.pekko" %% "pekko-slf4j" % PekkoVersion,
       "org.apache.pekko" %% "pekko-stream-testkit" % PekkoVersion % Test,
-      "org.apache.pekko" %% "pekko-connectors-kafka" % 
"0.0.0+1708-6e5cb74d-SNAPSHOT" % Test,
+      "org.apache.pekko" %% "pekko-connectors-kafka" % 
"0.0.0+1715-d36a8e1a-SNAPSHOT" % Test,
       "junit" % "junit" % "4.13.2" % Test, // Eclipse Public License 1.0
       "org.scalatest" %% "scalatest" % "3.2.11" % Test // ApacheV2
     ))
diff --git 
a/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/model.scala
 
b/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/model.scala
index 0d0fef65b..7044f66cf 100644
--- 
a/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/model.scala
+++ 
b/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/model.scala
@@ -17,6 +17,7 @@ import java.util.{ Optional, OptionalInt }
 
 import org.apache.pekko
 import pekko.annotation.InternalApi
+import pekko.util.ccompat._
 import pekko.util.ccompat.JavaConverters._
 import pekko.util.ByteString
 
diff --git 
a/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/testkit/MessageFactory.scala
 
b/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/testkit/MessageFactory.scala
index 6caa8912d..ab3a84db2 100644
--- 
a/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/testkit/MessageFactory.scala
+++ 
b/reference/src/main/scala/org/apache/pekko/stream/connectors/reference/testkit/MessageFactory.scala
@@ -16,6 +16,7 @@ package org.apache.pekko.stream.connectors.reference.testkit
 import org.apache.pekko
 import pekko.annotation.ApiMayChange
 import pekko.stream.connectors.reference.{ ReferenceReadResult, 
ReferenceWriteMessage, ReferenceWriteResult }
+import pekko.util.ccompat._
 import pekko.util.ccompat.JavaConverters._
 import pekko.util.ByteString
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to