diff --git a/project/plugins.sbt b/project/plugins.sbt index 6529aac8..59597c28 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ addSbtPlugin("org.xerial.sbt" %% "sbt-sonatype" % "3.10.0") addSbtPlugin("com.github.sbt" %% "sbt-pgp" % "2.2.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") -addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.1") addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") diff --git a/tyrian/js/src/main/scala/tyrian/Sub.scala b/tyrian/js/src/main/scala/tyrian/Sub.scala index 96cc29a1..540c2c2f 100644 --- a/tyrian/js/src/main/scala/tyrian/Sub.scala +++ b/tyrian/js/src/main/scala/tyrian/Sub.scala @@ -222,7 +222,7 @@ object Sub: /** A subscription that emits a `msg` based on the running time in seconds whenever the browser renders an animation * frame. */ - @nowarn("msg=discarded") + @nowarn("msg=unused") def animationFrameTick[F[_]: Async, Msg](id: String)(toMsg: Double => Msg): Sub[F, Msg] = Sub.make( id, diff --git a/tyrian/js/src/main/scala/tyrian/http/Http.scala b/tyrian/js/src/main/scala/tyrian/http/Http.scala index f8df524a..ec83f6c5 100644 --- a/tyrian/js/src/main/scala/tyrian/http/Http.scala +++ b/tyrian/js/src/main/scala/tyrian/http/Http.scala @@ -35,7 +35,7 @@ object Http: */ def send[F[_]: Async, A, Msg](request: Request[A], resultToMessage: Decoder[Msg]): Cmd.Run[F, Msg, Msg] = - @nowarn("msg=discarded") + @nowarn("msg=unused") def fetchTask(abortController: dom.AbortController): F[dom.Response] = Async[F].async_ { callback => val requestInit = new RequestInit {} @@ -62,7 +62,7 @@ object Http: () } - @nowarn("msg=discarded") + @nowarn("msg=unused") def textBodyTask(domResponse: dom.Response): F[String] = Async[F].async_ { callback => domResponse .text() diff --git a/tyrian/js/src/test/scala/tyrian/CmdSubUtils.scala b/tyrian/js/src/test/scala/tyrian/CmdSubUtils.scala index 76556285..3a6ea0ce 100644 --- a/tyrian/js/src/test/scala/tyrian/CmdSubUtils.scala +++ b/tyrian/js/src/test/scala/tyrian/CmdSubUtils.scala @@ -23,7 +23,7 @@ object CmdSubUtils: extension [A](sub: Sub[IO, A]) def run: (Either[Throwable, A] => Unit) => IO[Unit] = runSub(sub) @SuppressWarnings(Array("scalafix:DisableSyntax.throw")) - @nowarn("msg=discarded") + @nowarn("msg=unused") def runSub[A, Msg](sub: Sub[IO, Msg])(callback: Either[Throwable, A] => Unit): IO[Unit] = sub match case s: Sub.Observe[IO, A, Msg] @unchecked => diff --git a/tyrian/js/src/test/scala/tyrian/CmdTests.scala b/tyrian/js/src/test/scala/tyrian/CmdTests.scala index a24fae15..1b992730 100644 --- a/tyrian/js/src/test/scala/tyrian/CmdTests.scala +++ b/tyrian/js/src/test/scala/tyrian/CmdTests.scala @@ -62,8 +62,10 @@ class CmdTests extends munit.CatsEffectSuite { .map(_ * 10) ) - mapped.cmd1.run.assertEquals(1000) - mapped.cmd2.run.assertEquals(100) + for { + _ <- mapped.cmd1.run.assertEquals(1000) + _ <- mapped.cmd2.run.assertEquals(100) + } yield () } test("map - Batch") {