Skip to content

extraProjects with auto-root aggregate breaks key aggregation #4947

@dwijnand

Description

@dwijnand

steps

sbt version: 1.2.8

val a = project
val p = project.enablePlugins(SbtPlugin).settings(
  scriptedDependencies := println("hi"),
)
> scripted
hi
[success] Total time: 0 s, completed 14-Aug-2019 08:23:23

add project/FooPlugin.scala:

import sbt._

object FooPlugin extends AutoPlugin {
  override def trigger       = allRequirements
  override def extraProjects = Seq(Project("z", file("z")))
}
> projects
[info] In file:/s/t-sbt-extraProjects-aggregate-act/
[info] 	   a
[info] 	   p
[info] 	 * t-sbt-extraprojects-aggregate-act
[info] 	   z

problem

> scripted
[error] Not a valid command: scripted
[error] No such setting/task
[error] scripted
[error]         ^

expectation

scripted runs as before

notes

One workaround is to define the root project, but then you need to name all the projects you want to aggregate (see #4510):

val r = project.in(file("."))
aggregateProjects(a, p)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions