File tree 2 files changed +10
-4
lines changed
scalafix-interfaces/src/main/java/scalafix/internal/interfaces
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -382,13 +382,18 @@ lazy val integration = projectMatrix
382
382
)
383
383
.value,
384
384
// Mimic sbt-scalafix usage of interfaces (without properties per default)
385
- // to exercise dynamic loading of latest scalafix-properties artifact
385
+ // to exercise dynamic loading of scalafix-properties artifact
386
386
Test / internalDependencyClasspath := {
387
387
val prev = (Test / internalDependencyClasspath).value
388
388
val propertiesClassDirectory =
389
389
(properties / Compile / classDirectory).value
390
390
prev.filter(_.data != propertiesClassDirectory)
391
- }
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
392
397
)
393
398
.defaultAxes(VirtualAxis .jvm)
394
399
.jvmPlatformFull(cliScalaVersions)
Original file line number Diff line number Diff line change @@ -63,11 +63,12 @@ public static List<URL> latestScalafixPropertiesJars(
63
63
List <Repository > repositories
64
64
) throws ScalafixException {
65
65
Module module = Module .of ("ch.epfl.scala" , "scalafix-properties" );
66
+ String allowedVersion = System .getProperty ("scalafix-properties.version" );
66
67
String version = versions (repositories , module )
67
68
.getAvailable ()
68
69
.stream ()
69
- // Ignore RC & SNAPSHOT versions
70
- .filter (v -> v . startsWith ( "0.14.2+ " ) || ! v . contains ( "-" ))
70
+ // Ignore RC & SNAPSHOT versions, except if explicitly requested
71
+ .filter (v -> ! v . contains ( "- " ) || v . equals ( allowedVersion ))
71
72
.reduce ((older , newer ) -> newer )
72
73
.orElseThrow (() -> new ScalafixException ("Could not find any stable version for " + module ));
73
74
You can’t perform that action at this time.
0 commit comments