Skip to content

Commit

Permalink
actually use JDK21 for JDK21 CI
Browse files Browse the repository at this point in the history
- don't load artifacts built with old scala versions per
  https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
- ignore tests with hardcoded old sbt versions, since these were built with
  Scala versions not supported by JDK21 - we need a way to run these tests
  with max(scriptedSbt, build.properties) if we want to re-enable them
  • Loading branch information
bjaglin committed Feb 25, 2024
1 parent 8ae5b09 commit 555d1f3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
- uses: coursier/setup-action@v1
with:
jvm: temurin:17
- run: sbt "test; scripted sbt-*/* skip-windows/*"
jvm: temurin:21
- run: sbt "test; scripted sbt-scalafix/* skip-windows/*"
windows:
name: Windows tests
runs-on: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-scalafix/dependency/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.12.7"
scalaVersion := "2.12.18"

TaskKey[Unit]("check") := {
val a = IO.read((Compile / sourceDirectory).value / "scala" / "A.scala")
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-scalafix/local-rules/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inThisBuild(
"ch.epfl.scala" %% "example-scalafix-rule" % "1.4.0"
),
resolvers += Resolver.sonatypeRepo("snapshots"),
scalaVersion := "2.13.0", // out of sync with scalafix.sbt.BuildInfo.scala213 on purpose
scalaVersion := "2.13.11", // out of sync with scalafix.sbt.BuildInfo.scala213 on purpose
scalafixScalaBinaryVersion :=
// this should be the default in sbt-scalafix 1.0
CrossVersion.binaryScalaVersion(scalaVersion.value)
Expand All @@ -24,7 +24,7 @@ val rules = project
val service = project
.dependsOn(rules % ScalafixConfig)
.settings(
libraryDependencies += "com.nequissimus" %% "sort-imports" % "0.5.2" % ScalafixConfig
libraryDependencies += "ch.epfl.scala" %% "example-scalafix-rule" % "3.0.0" % ScalafixConfig
)

val sameproject = project
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-scalafix/local-rules/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ $ delete rules/src/main/scala/local/NoOp.scala
> service/scalafix SyntacticRule

# run a rule included from a remote JAR referenced via the Scalafix ivy config
> service/scalafix SortImports
> service/scalafix SyntacticRule

> sameproject/scalafix SameProjectSyntacticRule
4 changes: 2 additions & 2 deletions src/sbt-test/skip-windows/caching/test
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ $ mkdir src/main/scala
$ copy-file files/Valid.scala src/main/scala/Valid.scala
> scalafix --check ProcedureSyntax
> reload plugins
> 'set dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.9.17+5-86d5550d-SNAPSHOT"' // different than current, requires bumping when using new APIs
> 'set dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.11.0"' // different than current, requires bumping when using new APIs
> session save
> reload return
$ exec chmod 000 src/main/scala/Valid.scala
Expand All @@ -349,7 +349,7 @@ $ copy-file files/Valid.scala src/main/scala/Valid.scala
> set scalafixDependencies in ThisBuild := Nil
> scalafix --check ProcedureSyntax
> reload plugins
> 'set dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.9.17+7-a1b6d972-SNAPSHOT"' // different than above, requires bumping when using new APIs
> 'set dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.11.0+134-f4dcc6fa-SNAPSHOT"' // different than above, requires bumping when using new APIs
> session save
> reload return
> set scalafixDependencies in ThisBuild := Nil
Expand Down

0 comments on commit 555d1f3

Please sign in to comment.