Skip to content

Commit fe8a5fd

Browse files
committed
Revert "make test resilient to scala upgrades beyond 0.14.3"
This reverts commit 5d07bce.
1 parent b2e3121 commit fe8a5fd

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

build.sbt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,18 +382,13 @@ lazy val integration = projectMatrix
382382
)
383383
.value,
384384
// Mimic sbt-scalafix usage of interfaces (without properties per default)
385-
// to exercise dynamic loading of scalafix-properties artifact
385+
// to exercise dynamic loading of latest scalafix-properties artifact
386386
Test / internalDependencyClasspath := {
387387
val prev = (Test / internalDependencyClasspath).value
388388
val propertiesClassDirectory =
389389
(properties / Compile / classDirectory).value
390390
prev.filter(_.data != propertiesClassDirectory)
391-
},
392-
// Since tests may depend on new values, we use a system property to ScalafixCoursier
393-
// to whitelist a specific SNAPSHOT version from the list of available ones
394-
Test / javaOptions += s"-Dscalafix-properties.version=${version.value}",
395-
Test / fork := true,
396-
Test / baseDirectory := (ThisBuild / baseDirectory).value
391+
}
397392
)
398393
.defaultAxes(VirtualAxis.jvm)
399394
.jvmPlatform(CrossVersion.full, cliScalaVersions)

scalafix-interfaces/src/main/java/scalafix/internal/interfaces/ScalafixCoursier.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ public static List<URL> latestScalafixPropertiesJars(
6363
List<Repository> repositories
6464
) throws ScalafixException {
6565
Module module = Module.of("ch.epfl.scala", "scalafix-properties");
66-
String allowedVersion = System.getProperty("scalafix-properties.version");
6766
String version = versions(repositories, module)
6867
.getAvailable()
6968
.stream()
70-
// Ignore RC & SNAPSHOT versions, except if explicitly requested
71-
.filter(v -> !v.contains("-") || v.equals(allowedVersion))
69+
// Ignore RC & SNAPSHOT versions
70+
.filter(v -> v.startsWith("0.14.2+") || !v.contains("-"))
7271
.reduce((older, newer) -> newer)
7372
.orElseThrow(() -> new ScalafixException("Could not find any stable version for " + module));
7473

0 commit comments

Comments
 (0)