mirror of https://github.com/sbt/sbt.git
[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
This commit is contained in:
parent
88812f27a3
commit
0ec500392f
|
|
@ -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
|
||||
}) :::
|
||||
|
|
|
|||
Loading…
Reference in New Issue