Skip to content
Open
Changes from 2 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
20 changes: 13 additions & 7 deletions project/scripts/bisect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ object ValidationScript:
def tmpScalaCliScript(command: String, args: Seq[String]): File = tmpScript(s"""
|#!/usr/bin/env bash
|export JAVA_HOME=${sys.props("java.home")}
|scala-cli ${command} -S "$$1" --server=false ${args.mkString(" ")}
|scala-cli ${command} --repository=https://repo.scala-lang.org/artifactory/maven-nightlies/ -S "$$1" --server=false ${args.mkString(" ")}
Copy link
Contributor

@Gedochao Gedochao Sep 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a particularly great idea to pass the repository here, as it still won't be used everywhere it should.
The repository has already been added internally in Scala CLI and can be accessed via nightly:

The fix will be included in the next stable Scala CLI (working on it).
If we really want to fix the script before a stable Scala CLI is available, then a better idea would be to:

Suggested change
|scala-cli ${command} --repository=https://repo.scala-lang.org/artifactory/maven-nightlies/ -S "$$1" --server=false ${args.mkString(" ")}
|scala-cli --cli-version nightly ${command} -S "$$1" --server=false ${args.mkString(" ")}

Or just wait a bit.

|""".stripMargin
)

Expand Down Expand Up @@ -177,14 +177,20 @@ class Releases(val releases: Vector[Release])

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

def fromRange(range: ReleasesRange): Vector[Release] = range.filter(allReleases)
Expand Down
Loading