typelevel / typelevel/sbt-typelevel
Can't set githubWorkflowScalaVersions := Nil
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 185
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
When setting
githubWorkflowScalaVersions := Nil
the build fails to load with the following error:
java.lang.RuntimeException: Bug generating artifact download steps
at scala.sys.package$.error(package.scala:30)
at org.typelevel.sbt.gha.GenerativePlugin$.$anonfun$buildSettings$7(GenerativePlugin.scala:753)
at scala.collection.immutable.List.map(List.scala:293)
at org.typelevel.sbt.gha.GenerativePlugin$.$anonfun$buildSettings$5(GenerativePlugin.scala:751)
at scala.Function1.$anonfun$compose$1(Function1.scala:49)
at sbt.internal.util.EvaluateSettings$MixedNode.evaluate0(INode.scala:229)
at sbt.internal.util.EvaluateSettings$INode.evaluate(INode.scala:171)
at sbt.internal.util.EvaluateSettings.$anonfun$submitEvaluate$1(INode.scala:88)
at sbt.internal.util.EvaluateSettings.sbt$internal$util$EvaluateSettings$$run0(INode.scala:100)
at sbt.internal.util.EvaluateSettings$$anon$3.run(INode.scala:95)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
[error] Bug generating artifact download steps
[error] Use 'last' for the full log.
Motivation
In my case, I want to set
githubWorkflowScalaVersions := Nil
githubWorkflowBuildSbtStepPreamble := Nil
in an sbt-projectmatrix driven project, because there are subprojects for each Scala version already, and so there's no need to use sbt's built-in cross building support.
As a workaround, I've set:
githubWorkflowScalaVersions := Seq("per-project-matrix")
githubWorkflowBuildSbtStepPreamble := Nil
but that's a little goofy and not setting a Scala matrix axis would be preferred.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in GenerativePlugin.scala around lines 751-753, where artifact download steps are generated, and reproduce the failure with githubWorkflowScalaVersions := Nil. Trace how an empty Scala version list is handled alongside githubWorkflowBuildSbtStepPreamble := Nil. Done means the build loads successfully without a Scala matrix axis and the existing workaround is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, scala
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100