Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- ubuntu-22.04-arm
- windows-latest
- macos-14
scala: [3.3.5, 2.12.20, 2.13.16]
scala: [3.3.7, 2.12.20, 2.13.16]
java:
- temurin@8
- temurin@11
Expand All @@ -41,9 +41,9 @@ jobs:
- graalvm@21
ci: [ciJVM, ciNative, ciJS, ciFirefox, ciChrome]
exclude:
- scala: 3.3.5
- scala: 3.3.7
java: temurin@11
- scala: 3.3.5
- scala: 3.3.7
java: temurin@21
- scala: 2.12.20
java: temurin@11
Expand All @@ -62,10 +62,10 @@ jobs:
- os: ubuntu-22.04-arm
java: graalvm@21
- os: windows-latest
scala: 3.3.5
scala: 3.3.7
ci: ciJVM
- os: macos-14
scala: 3.3.5
scala: 3.3.7
ci: ciJVM
- os: windows-latest
scala: 2.12.20
Expand All @@ -78,9 +78,9 @@ jobs:
- os: macos-14
java: temurin@11
- ci: ciFirefox
scala: 3.3.5
scala: 3.3.7
- ci: ciChrome
scala: 3.3.5
scala: 3.3.7
- ci: ciFirefox
scala: 2.12.20
- ci: ciChrome
Expand Down Expand Up @@ -287,24 +287,24 @@ jobs:
run: sbt githubWorkflowCheck

- name: Check that scalafix has been run on JVM
if: matrix.ci == 'ciJVM' && matrix.scala != '3.3.5' && matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.ci == 'ciJVM' && matrix.scala != '3.3.7' && matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
shell: bash
run: sbt '++ ${{ matrix.scala }}' 'rootJVM/scalafixAll --check'

- name: Check that scalafix has been run on JS
if: matrix.ci == 'ciJS' && matrix.scala != '3.3.5' && matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.ci == 'ciJS' && matrix.scala != '3.3.7' && matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
shell: bash
run: sbt '++ ${{ matrix.scala }}' 'rootJS/scalafixAll --check'

- name: Check that scalafix has been run on Native
if: matrix.ci == 'ciNative' && matrix.scala != '3.3.5' && matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.ci == 'ciNative' && matrix.scala != '3.3.7' && matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
shell: bash
run: sbt '++ ${{ matrix.scala }}' 'rootNative/scalafixAll --check'

- shell: bash
run: sbt '++ ${{ matrix.scala }}' '${{ matrix.ci }}'

- if: (matrix.scala == '2.13.16' || matrix.scala == '3.3.5') && matrix.ci == 'ciJVM' && matrix.java == 'temurin@17'
- if: (matrix.scala == '2.13.16' || matrix.scala == '3.3.7') && matrix.ci == 'ciJVM' && matrix.java == 'temurin@17'
shell: bash
run: sbt '++ ${{ matrix.scala }}' docs/mdoc

Expand All @@ -324,7 +324,7 @@ jobs:
run: example/test-native.sh ${{ matrix.scala }}

- name: Test GraalVM Native Image
if: (matrix.scala == '2.13.16' || matrix.scala == '3.3.5') && matrix.java == 'graalvm@21' && matrix.os == 'ubuntu-latest'
if: (matrix.scala == '2.13.16' || matrix.scala == '3.3.7') && matrix.java == 'graalvm@21' && matrix.os == 'ubuntu-latest'
shell: bash
run: sbt '++ ${{ matrix.scala }}' graalVMExample/nativeImage graalVMExample/nativeImageRun

Expand Down Expand Up @@ -439,32 +439,32 @@ jobs:
if: matrix.java == 'graalvm@21' && steps.setup-java-graalvm-21.outputs.cache-hit == 'false'
run: sbt +update

- name: Download target directories (3.3.5, ciJVM)
- name: Download target directories (3.3.7, ciJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.5-ciJVM
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.7-ciJVM

- name: Inflate target directories (3.3.5, ciJVM)
- name: Inflate target directories (3.3.7, ciJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3.3.5, ciNative)
- name: Download target directories (3.3.7, ciNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.5-ciNative
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.7-ciNative

- name: Inflate target directories (3.3.5, ciNative)
- name: Inflate target directories (3.3.7, ciNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3.3.5, ciJS)
- name: Download target directories (3.3.7, ciJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.5-ciJS
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.7-ciJS

- name: Inflate target directories (3.3.5, ciJS)
- name: Inflate target directories (3.3.7, ciJS)
run: |
tar xf targets.tar
rm targets.tar
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ val MacOS = "macos-14"

val Scala212 = "2.12.20"
val Scala213 = "2.13.16"
val Scala3 = "3.3.5"
val Scala3 = "3.3.7"

ThisBuild / crossScalaVersions := Seq(Scala3, Scala212, Scala213)
ThisBuild / githubWorkflowScalaVersions := crossScalaVersions.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ private class Tail extends Head {
* integer value are ignored in most operations).
*/
protected var tail: Int = 0

@volatile
private[this] var tailPublisher: Int = 0

{
// prevent unused warnings
tailPublisher = 0
}
}

private object Tail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ object PureConcGenerators {

val F: GenSpawn[PureConc[E, *], E] = allocateForPureConc[E]

def cogenCase[A: Cogen]: Cogen[Outcome[PureConc[E, *], E, A]] =
OutcomeGenerators.cogenOutcome[PureConc[E, *], E, A]

override def recursiveGen[B: Arbitrary: Cogen](deeper: GenK[PureConc[E, *]]) =
super
.recursiveGen[B](deeper)
Expand Down
7 changes: 4 additions & 3 deletions kernel/shared/src/main/scala/cats/effect/kernel/Async.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import cats.arrow.FunctionK
import cats.data.{EitherT, Ior, IorT, Kleisli, OptionT, WriterT}
import cats.implicits._

import scala.annotation.{nowarn, tailrec}
import org.typelevel.scalaccompat.annotation.unused

import scala.annotation.tailrec
import scala.concurrent.{ExecutionContext, Future}

import java.util.concurrent.Executor
Expand Down Expand Up @@ -296,8 +298,7 @@ trait Async[F[_]] extends AsyncPlatform[F] with Sync[F] with Temporal[F] {
* @param limit
* The maximum number of stages to evaluate prior to forcibly yielding to `F`
*/
@nowarn("msg=never used")
def syncStep[G[_], A](fa: F[A], limit: Int)(implicit G: Sync[G]): G[Either[F[A], A]] =
def syncStep[G[_], A](fa: F[A], @unused limit: Int)(implicit G: Sync[G]): G[Either[F[A], A]] =
G.pure(Left(fa))

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ trait TestInstances extends ParallelFGenerators with OutcomeGenerators with Sync

val F: Async[IO] = IO.asyncForIO

def cogenCase[B: Cogen]: Cogen[OutcomeIO[B]] =
OutcomeGenerators.cogenOutcome[IO, Throwable, B]

val arbitraryEC: Arbitrary[ExecutionContext] = outer.arbitraryExecutionContext

val cogenFU: Cogen[IO[Unit]] = cogenIO[Unit]
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/src/test/scala/cats/effect/ThunkSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ThunkSuite extends BaseSuite {

testUnit("return the same function") {
var i = 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a "workaround", it would not warn for i = i + 1 (despite the equivalence).

val f = () => i += 1
val f = () => { i = i + 1 }
assertEquals(IO.delay(f()).asInstanceOf[IO.Delay[Unit]].thunk, f)
}

Expand Down
Loading