Skip to content

Conversation

WojciechMazur
Copy link
Contributor

The new repo contains only artefacts published after 2025-08-18, we need to parse maven-matadata from the old repository to get the full list of available nightlyies

…po contains only artifacts published after 2025-08-18
@hamzaremmal
Copy link
Member

The intent is to have maven central also accessible via the new repo, I had permission issues when configuring it during Scala Days and I haven't yet fixed them. This should cover for this PR.

@WojciechMazur
Copy link
Contributor Author

The intent is to have maven central also accessible via the new repo, I had permission issues when configuring it during Scala Days and I haven't yet fixed them. This should cover for this PR.

I belive the repo.scala-lang already can delegate to Maven Central for missing artifacts, however, in this case we're extracting the maven-metadata.xml. Before there were any releases made to repo.scala-lang.org it was mirroring the metadata file existing in Maven Central. However, as soon as it started to contain it's own versions it returns its own maven-metadata.xml file containing its published versions, but no releases made to Maven Central. It seems like a valid behaviour to me, that's why we're looking for releases in 2 places. I'm not sure if it's fixable otherwise

@hamzaremmal
Copy link
Member

However, as soon as it started to contain it's own versions it returns its own maven-metadata.xml file containing its published versions, but no releases made to Maven Central. It seems like a valid behaviour to me, that's why we're looking for releases in 2 places. I'm not sure if it's fixable otherwise

I'll let you see the maven-metadata.xml file once I fix what I intend to fix. Maybe I'm mistaken, but it should cover everything. Note that at the moment the scala repo doesn't mirror maven central yet as I had to disable it to make it work with the time constraint I had last week.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants