Skip to content

Cross-build for Scala 2.11 #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2021
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.14, 2.13.6, 3.0.2]
scala: [2.11.12, 2.12.14, 2.13.6, 3.0.2]
java: [[email protected]]
ci: [ciNode, ciFirefox, ciChrome, ciJSDOMNodeJS]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ThisBuild / scmInfo := Some(

// build and matrix configuration

ThisBuild / crossScalaVersions := Seq("2.12.14", "2.13.6", "3.0.2")
ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.14", "2.13.6", "3.0.2")

ThisBuild / githubWorkflowBuildPreamble ++= Seq(
WorkflowStep.Use(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MacrotaskExecutorSuite extends FunSuite {
if (n <= 0)
Future(0)
else
Future.unit.flatMap(_ => loop(n - 1)).map(_ + 1)
Future.successful(()).flatMap(_ => loop(n - 1)).map(_ + 1)
Copy link
Member Author

Choose a reason for hiding this comment

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

Annoying but they are just tests.


val start = System.currentTimeMillis()
val MinimumClamp = 10000 * 2 * 4 // HTML5 specifies a 4ms clamp (https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout#Minimum.2F_maximum_delay_and_timeout_nesting)
Expand All @@ -52,7 +52,7 @@ class MacrotaskExecutorSuite extends FunSuite {
def loop(): Future[Unit] =
Future(cancel) flatMap { canceled =>
if (canceled)
Future.unit
Future.successful(())
else
loop()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.scalajs.macrotaskexecutor

import munit.FunSuite
import org.scalajs.dom.MessageEvent
import org.scalajs.dom.webworkers.Worker

import scala.concurrent.Promise
Expand All @@ -41,7 +42,7 @@ class WebWorkerMacrotaskSuite extends FunSuite {
s"file://${targetDir}/scala-js-macrotask-executor-webworker-fastopt/main.js"
)

worker.onmessage = { event =>
worker.onmessage = { (event: MessageEvent) =>
event.data match {
case log: String => println(log)
case success: Boolean => p.success(success)
Expand Down