Skip to content

Fix listing release versions for bisect script. #19356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all 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
10 changes: 7 additions & 3 deletions project/scripts/bisect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,13 @@ class Releases(val releases: Vector[Release])

object Releases:
lazy val allReleases: Vector[Release] =
val re = raw"""(?<=title=")(.+-bin-\d{8}-\w{7}-NIGHTLY)(?=/")""".r
val html = Source.fromURL("https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/")
re.findAllIn(html.mkString).map(Release.apply).toVector
val re = raw"<version>(.+-bin-\d{8}-\w{7}-NIGHTLY)</version>".r
val xml = io.Source.fromURL(
"https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/maven-metadata.xml"
)
re.findAllMatchIn(xml.mkString)
.flatMap{ m => Option(m.group(1)).map(Release.apply) }
.toVector

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

Expand Down