Skip to content

Commit d86ae08

Browse files
Fetch Dotty nightlies correctly
1 parent ed11706 commit d86ae08

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sbt-scala3/src/dotty/tools/sbtplugin/DottyPlugin.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ object DottyPlugin extends AutoPlugin {
3535

3636
// get latest nightly version from maven
3737
def fetchSource(version: String): (scala.io.BufferedSource, String) =
38-
try Source.fromURL(s"https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_$version/maven-metadata.xml") -> version
38+
try {
39+
val url =
40+
if (version.startsWith("0"))
41+
s"https://repo1.maven.org/maven2/ch/epfl/lamp/dotty-compiler_$version/maven-metadata.xml"
42+
else
43+
s"https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_$version/maven-metadata.xml"
44+
Source.fromURL(url) -> version
45+
}
3946
catch { case t: java.io.FileNotFoundException =>
4047
val major :: minor :: Nil = version.split('.').toList
4148
if (minor.toInt <= 0) throw t

0 commit comments

Comments
 (0)