From 49838d518387b6a5482a05697e3afb4373d628a1 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Tue, 29 Aug 2023 15:38:16 +0000 Subject: [PATCH] Fix deprecations and tweak Cirrus CI --- .cirrus.yml | 17 ++++------------- .../main/scala/fs2/benchmark/ChunkFlatten.scala | 4 ++-- .../src/main/scala-2.12/fs2/ChunkPlatform.scala | 2 +- .../scala-2.13+/fs2/Chunk213And3Compat.scala | 2 +- core/shared/src/main/scala/fs2/Chunk.scala | 12 ++++++------ 5 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f2440122b7..d4ad55b261 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,16 +1,7 @@ macos_task: macos_instance: image: ghcr.io/cirruslabs/macos-ventura-base:latest - matrix: - - name: Node.js Apple Silicon - script: - - brew install sbt - - sbt ioJS/test - - name: JVM Apple Silicon - script: - - brew install sbt - - sbt ioJVM/test - - name: Native Apple Silicon - script: - - brew install sbt s2n - - sbt ioNative/test + name: Apple Silicon + script: + - brew install sbt s2n + - sbt ioJVM/test ioJS/test ioNative/test diff --git a/benchmark/src/main/scala/fs2/benchmark/ChunkFlatten.scala b/benchmark/src/main/scala/fs2/benchmark/ChunkFlatten.scala index 4b18c81a3d..93f50265c0 100644 --- a/benchmark/src/main/scala/fs2/benchmark/ChunkFlatten.scala +++ b/benchmark/src/main/scala/fs2/benchmark/ChunkFlatten.scala @@ -42,11 +42,11 @@ class ChunkFlatten { @Setup def setup() = - chunkSeq = Seq.range(0, numberChunks).map(_ => Chunk.seq(Seq.fill(chunkSize)(Obj.create))) + chunkSeq = Seq.range(0, numberChunks).map(_ => Chunk.from(Seq.fill(chunkSize)(Obj.create))) @Benchmark def flatten(): Unit = { - Chunk.seq(chunkSeq).flatten + Chunk.from(chunkSeq).flatten () } diff --git a/core/shared/src/main/scala-2.12/fs2/ChunkPlatform.scala b/core/shared/src/main/scala-2.12/fs2/ChunkPlatform.scala index 37ed817f6b..041bffd2c0 100644 --- a/core/shared/src/main/scala-2.12/fs2/ChunkPlatform.scala +++ b/core/shared/src/main/scala-2.12/fs2/ChunkPlatform.scala @@ -83,7 +83,7 @@ private[fs2] trait ChunkCompanionPlatform { */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def wrappedArray[O](wrappedArray: WrappedArray[O]): Chunk[O] = from(wrappedArray) diff --git a/core/shared/src/main/scala-2.13+/fs2/Chunk213And3Compat.scala b/core/shared/src/main/scala-2.13+/fs2/Chunk213And3Compat.scala index 6afee8294e..a12bbcc8c0 100644 --- a/core/shared/src/main/scala-2.13+/fs2/Chunk213And3Compat.scala +++ b/core/shared/src/main/scala-2.13+/fs2/Chunk213And3Compat.scala @@ -94,7 +94,7 @@ private[fs2] trait ChunkCompanion213And3Compat { /** Creates a chunk backed by an immutable `ArraySeq`. */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def arraySeq[O](arraySeq: ArraySeq[O]): Chunk[O] = from(arraySeq) diff --git a/core/shared/src/main/scala/fs2/Chunk.scala b/core/shared/src/main/scala/fs2/Chunk.scala index 3b9676c969..43c52bd321 100644 --- a/core/shared/src/main/scala/fs2/Chunk.scala +++ b/core/shared/src/main/scala/fs2/Chunk.scala @@ -626,7 +626,7 @@ object Chunk /** Creates a chunk backed by a vector. */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def vector[O](v: Vector[O]): Chunk[O] = from(v) @@ -634,7 +634,7 @@ object Chunk /** Creates a chunk backed by an `IndexedSeq`. */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def indexedSeq[O](s: GIndexedSeq[O]): Chunk[O] = from(s) @@ -723,7 +723,7 @@ object Chunk /** Creates a chunk from a `scala.collection.Seq`. */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def seq[O](s: GSeq[O]): Chunk[O] = from(s) @@ -731,7 +731,7 @@ object Chunk /** Creates a chunk from a `scala.collection.Iterable`. */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def iterable[O](i: GIterable[O]): Chunk[O] = from(i) @@ -781,7 +781,7 @@ object Chunk */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def arraySeq[O](arraySeq: mutable.ArraySeq[O]): Chunk[O] = from(arraySeq) @@ -1122,7 +1122,7 @@ object Chunk */ @deprecated( "Use the `from` general factory instead", - "3.8.1" + "3.9.0" ) def queue[A](queue: collection.immutable.Queue[A]): Chunk[A] = from(queue)