Skip to content

Commit

Permalink
Merge branch 'main' into update/munit-cats-effect-2.0.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist authored May 12, 2024
2 parents bfc34f8 + 0a5d12f commit 9696e5f
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ jobs:
project: [ioJS, ioJVM, ioNative]
runs-on: ${{ matrix.os }}
steps:
- run: brew install sbt

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions 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 Expand Up @@ -36,7 +36,9 @@ ThisBuild / githubWorkflowAddedJobs +=
javas = List(githubWorkflowJavaVersions.value.head),
oses = List("macos-latest"),
matrixAdds = Map("project" -> List("ioJS", "ioJVM", "ioNative")),
steps = githubWorkflowJobSetup.value.toList ++ List(
steps = List(
WorkflowStep.Run(List("brew install sbt"))
) ++ githubWorkflowJobSetup.value.toList ++ List(
WorkflowStep.Run(List("brew install s2n"), cond = Some("matrix.project == 'ioNative'")),
WorkflowStep.Sbt(List("${{ matrix.project }}/test"))
)
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
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.9
sbt.version=1.10.0
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
val sbtTypelevelVersion = "0.6.7"
val sbtTypelevelVersion = "0.7.1"
addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion)
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % sbtTypelevelVersion)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
addSbtPlugin("com.armanbilge" % "sbt-scala-native-config-brew-github-actions" % "0.2.0-RC1")
addSbtPlugin("com.armanbilge" % "sbt-scala-native-config-brew-github-actions" % "0.3.0")
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")

0 comments on commit 9696e5f

Please sign in to comment.