Skip to content

Commit 01f58f7

Browse files
committed
Fix detecting available nightly verisons in bisect script. The new repo contains only artifacts published after 2025-08-18
1 parent 712d5bc commit 01f58f7

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

project/scripts/bisect.scala

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,20 @@ class Releases(val releases: Vector[Release])
177177

178178
object Releases:
179179
lazy val allReleases: Vector[Release] =
180-
val re = raw"<version>(.+-bin-\d{8}-\w{7}-NIGHTLY)</version>".r
181-
val xml = io.Source.fromURL(
182-
"https://repo.scala-lang.org/artifactory/maven-nightlies/org/scala-lang/scala3-compiler_3/maven-metadata.xml"
180+
Seq(
181+
// Until 3.8.0-RC1-bin-20250822-658c8bd-NIGHTLY
182+
"https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/maven-metadata.xml",
183+
// From 3.8.0-RC1-bin-20250818-aaa39c5-NIGHTLY
184+
"https://repo.scala-lang.org/artifactory/maven-nightlies/org/scala-lang/scala3-compiler_3/maven-metadata.xml",
183185
)
184-
re.findAllMatchIn(xml.mkString)
186+
.map(io.Source.fromURL(_).mkString)
187+
.flatMap: metadataXML =>
188+
raw"<version>(.+-bin-\d{8}-\w{7}-NIGHTLY)</version>".r
189+
.findAllMatchIn(metadataXML)
185190
.flatMap{ m => Option(m.group(1)).map(Release.apply) }
186-
.toVector
187-
.sortBy: release =>
191+
.toVector
192+
.distinctBy(_.version)
193+
.sortBy: release =>
188194
(release.version, release.date)
189195

190196
def fromRange(range: ReleasesRange): Vector[Release] = range.filter(allReleases)

0 commit comments

Comments
 (0)