From 0ec500392f2cf05822ffd14bcb79b371dd992253 Mon Sep 17 00:00:00 2001 From: MkDev11 Date: Mon, 12 Jan 2026 01:42:39 -0500 Subject: [PATCH] [2.x] ci: Handle undefined crossScalaVersions in publishLocalAllModule (#8491) The publishLocalAllModule command fails with 'crossScalaVersions is undefined' when the zinc submodule's compilerBridge project doesn't have crossScalaVersions defined. This is a long-standing issue that was reported in #4387 (2018) and 'magically resolved' when zinc happened to define the setting, then resurfaced in #7607 (2024) when zinc changed. The fix uses getOpt().getOrElse(Nil).toList instead of get().toList to handle the case where crossScalaVersions is not defined, allowing the command to proceed gracefully. Fixes #7607 --- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b83ae8e18..a88375b06 100644 --- a/build.sbt +++ b/build.sbt @@ -1060,7 +1060,8 @@ def customCommands: Seq[Setting[?]] = Seq( }).toList ::: (zincOpt map { case ProjectRef(build, _) => val zincSv = get((ProjectRef(build, "zinc") / scalaVersion)) - val csv = get((ProjectRef(build, "compilerBridge") / crossScalaVersions)).toList + val csv = + getOpt((ProjectRef(build, "compilerBridge") / crossScalaVersions)).getOrElse(Nil).toList (csv flatMap { bridgeSv => s"++$bridgeSv" :: ("{" + build.toString + "}compilerBridge/publishLocal") :: Nil }) :::