Skip to content

Commit 4121073

Browse files
committed
sbt-dotty: Fix the binary suffix used for publishing
The compiler we publish is compiled with a non-bootstrapped compiler, so its scalaBinaryVersion suffix is computed from the version number of the non-bootstrapped compiler, for 3.0.0-RC3 this was `3.0.0-RC3-nonboostrapped` and we correctly return `3.0.0-RC3` as a binary version, but for 3.0.0 this is `3.0.0-nonbootstrapped` for which we return again `3.0.0-nonbootstrapped` when we really want just `3`. This is why we incorrectly published https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3.0.0-nonbootstrapped/ Fixed by special-casing RCs and milestones which are the only special suffixes that get their own binary suffix. This fix is specific to the release-3.0.0 branch since the master branch does not use sbt-dotty anymore (and will need its own fix to publish 3.0.1-RC1 correctly due to a different issue with how sbt computes the suffix for `3.0.1-RC1-nonbootstrapped`).
1 parent a9f1fa6 commit 4121073

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ object DottyPlugin extends AutoPlugin {
264264
scalaBinaryVersion := {
265265
scalaVersion.value.split("[\\.-]").toList match {
266266
case "0" :: minor :: _ => s"0.$minor"
267-
case "3" :: "0" :: "0" :: milestone :: _ =>
267+
case "3" :: "0" :: "0" :: milestone :: _ if milestone.startsWith("M") || milestone.startsWith("RC") =>
268268
s"3.0.0-$milestone"
269269
case "3" :: _ =>
270270
"3"

0 commit comments

Comments
 (0)