Skip to content
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

Fix version mismatch #1016

Merged
merged 1 commit into from
Jan 2, 2024
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 build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ lazy val sbtRunner = project
akka("testkit") % Test,
akka("cluster"),
akka("slf4j"),
"org.scalameta" %% "scalafmt-core" % "3.7.14"
"org.scalameta" %% "scalafmt-core" % "3.7.17"
),
docker / imageNames := Seq(
ImageName(namespace = Some(dockerOrg), repository = "scastie-sbt-runner", tag = Some(gitHashNow)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class MetalsDispatcherTest extends CatsEffectSuite with Assertions with CatsEffe
test("single thread metals access") {
cache.use { cache =>
val dispatcher = dispatcherF(cache)
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latest3))
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latestLTS))
assertIO(dispatcher.getCompiler(options).isRight, true)
}
}

test("parallel metals access for same cache entry") {
cache.use { cache =>
val dispatcher = dispatcherF(cache)
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latest3))
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latestLTS))
val tasks = List.fill(10)(dispatcher.getCompiler(options).flatMap(_.complete(ScastieOffsetParams("prin", 4, true))).value).parSequence
assertIO(tasks.map(_.forall(_.isRight)), true)
}
Expand All @@ -55,7 +55,7 @@ class MetalsDispatcherTest extends CatsEffectSuite with Assertions with CatsEffe
cache.use { cache =>
{
val dispatcher = dispatcherF(cache)
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latest3))
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latestLTS))
val task = for {
pc <- dispatcher.getCompiler(options)
_ <- EitherT.right(IO.sleep(4.seconds))
Expand All @@ -69,7 +69,7 @@ class MetalsDispatcherTest extends CatsEffectSuite with Assertions with CatsEffe
test("parallel metals access same version") {
cache.use { cache =>
val dispatcher = dispatcherF(cache)
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latest3))
val options = ScastieMetalsOptions(Set.empty, ScalaTarget.Jvm(BuildInfo.latestLTS))
val task = dispatcher.getCompiler(options).value.parReplicateA(10000)
assertIO(task.map(results => results.nonEmpty && results.forall(_.isRight)), true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object TestUtils extends Assertions with CatsEffectAssertions {

type DependencyForVersion = ScalaTarget => ScalaDependency

val testTargets = List(BuildInfo.latest3, BuildInfo.stable3).map(ScalaTarget.Scala3.apply) ++
val testTargets = List(BuildInfo.latestLTS, BuildInfo.stableLTS, BuildInfo.latestNext).map(ScalaTarget.Scala3.apply) ++
List(BuildInfo.latest213, BuildInfo.latest212).map(ScalaTarget.Jvm.apply)

val unsupportedVersions = List(BuildInfo.latest211, BuildInfo.latest210).map(ScalaTarget.Jvm.apply)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class SbtActorTest() extends TestKit(ActorSystem("SbtActorTest")) with ImplicitS
test("Scala.js 3 support") {
val scalaJs =
Inputs.default.copy(code = "1 + 1",
target = ScalaTarget.Js.default.copy(scalaVersion = com.olegych.scastie.buildinfo.BuildInfo.latest3))
target = ScalaTarget.Js.default.copy(scalaVersion = com.olegych.scastie.buildinfo.BuildInfo.latestLTS))
run(scalaJs)(_.isDone)
}

Expand Down
Loading