Skip to content

Commit

Permalink
Merge branch 'main' into update/sbt-1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist committed May 12, 2024
2 parents 97d58b7 + 4f40902 commit c44e467
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ThisBuild / organization := "co.fs2"
ThisBuild / organizationName := "Functional Streams for Scala"
ThisBuild / startYear := Some(2013)

val Scala213 = "2.13.12"
val Scala213 = "2.13.14"

ThisBuild / scalaVersion := Scala213
ThisBuild / crossScalaVersions := Seq("2.12.19", Scala213, "3.3.3")
Expand Down
4 changes: 2 additions & 2 deletions core/shared/src/main/scala/fs2/Chunk.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1511,8 +1511,8 @@ object Chunk
case Right(b) =>
buf += b
go()
case Left(a) =>
state = (f(a).iterator) :: h :: tail
case Left(a2) =>
state = (f(a2).iterator) :: h :: tail
go()
}
}
Expand Down
5 changes: 2 additions & 3 deletions core/shared/src/main/scala/fs2/Pull.scala
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ object Pull extends PullLowPriority {
* The `F` type must be explicitly provided (e.g., via `raiseError[IO]`
* or `raiseError[Fallible]`).
*/
@nowarn("msg=never used")
def raiseError[F[_]: RaiseThrowable](err: Throwable): Pull[F, Nothing, Nothing] = Fail(err)

/** Creates a pull that evaluates the supplied effect `fr`, emits no
Expand Down Expand Up @@ -1192,8 +1191,8 @@ object Pull extends PullLowPriority {
else
// interrupts scope was already interrupted, resume operation
err1 match {
case None => unit
case Some(err) => Fail(err)
case None => unit
case Some(e2) => Fail(e2)
}
}

Expand Down
1 change: 0 additions & 1 deletion core/shared/src/main/scala/fs2/text.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
package fs2

import cats.ApplicativeThrow
import cats.syntax.foldable._
import java.nio.{Buffer, ByteBuffer, CharBuffer}
import java.nio.charset.{
CharacterCodingException,
Expand Down
2 changes: 0 additions & 2 deletions core/shared/src/test/scala-2.13/fs2/ChunkPlatformSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

package fs2

import scala.annotation.nowarn
import scala.collection.immutable.ArraySeq
import scala.collection.{immutable, mutable}
import scala.reflect.ClassTag
Expand All @@ -31,7 +30,6 @@ import Arbitrary.arbitrary

class ChunkPlatformSuite extends Fs2Suite {

@nowarn("cat=unused-params")
private implicit def genArraySeq[A: Arbitrary: ClassTag]: Arbitrary[ArraySeq[A]] =
Arbitrary(Gen.listOf(arbitrary[A]).map(ArraySeq.from))
private implicit def genMutableArraySeq[A: Arbitrary: ClassTag]: Arbitrary[mutable.ArraySeq[A]] =
Expand Down
1 change: 0 additions & 1 deletion core/shared/src/test/scala/fs2/StreamMergeSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import scala.concurrent.duration._

import cats.effect.IO
import cats.effect.kernel.{Deferred, Ref}
import cats.syntax.all._
import org.scalacheck.effect.PropF.forAllF

class StreamMergeSuite extends Fs2Suite {
Expand Down
1 change: 0 additions & 1 deletion integration/src/test/scala/fs2/MemoryLeakSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import java.nio.file.{Files, Path}
import cats.~>
import cats.effect.IO
import cats.effect.unsafe.implicits.global
import cats.syntax.all._
import org.typelevel.scalaccompat.annotation._

import munit.{FunSuite, TestOptions}
Expand Down
2 changes: 0 additions & 2 deletions io/js/src/test/scala/fs2/io/net/udp/UdpSuitePlatform.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ package io
package net
package udp

import cats.syntax.all._

import fs2.io.internal.facade

trait UdpSuitePlatform extends Fs2Suite {
Expand Down
5 changes: 4 additions & 1 deletion io/jvm/src/test/scala/fs2/io/file/WalkBenchmark.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ class WalkBenchmark extends Fs2IoSuite {
.unsafeRunSync()
)
val nioTime = time(java.nio.file.Files.walk(target.toNioPath).count())
val epsilon = nioTime.toNanos * 1.5
val isOSX = sys.props("os.name") == "Mac OS X"
val factor = if (isOSX) 4.0 else 1.5 // OS X GHA workers tend to fail this test at 1.5x
val epsilon = nioTime.toNanos * factor
println(s"limit: ${epsilon.nanos.toMillis} ms")
println(s"fs2 took: ${fs2Time.toMillis} ms")
println(s"fs2 eager took: ${fs2EagerTime.toMillis} ms")
println(s"nio took: ${nioTime.toMillis} ms")
Expand Down

0 comments on commit c44e467

Please sign in to comment.