-
Notifications
You must be signed in to change notification settings - Fork 1k
Adding subproject causes setting to no longer be evaluated (?) #7173
Copy link
Copy link
Closed
Labels
Milestone
Description
steps
sbt 1.8.2
val foo = project.in(file("foo"))
val fooAux = project.in(file("foo-aux")).settings(foo / Compile / sourceGenerators += Def.task(Seq.empty))
val bar = project
val baz = projectproblem
Project foo has no source generators.
sbt:sandbox> reload; show Compile/sourceGenerators
[info] welcome to sbt 1.8.2 (Azul Systems, Inc. Java 11.0.17)
[info] loading project definition from /workspace/sandbox/project
[info] loading settings for project sandbox from build.sbt ...
[info] set current project to sandbox (in build file:/workspace/sandbox/)
[info] foo / Compile / sourceGenerators
[info] List()
[info] fooAux / Compile / sourceGenerators
[info] List()
[info] bar / Compile / sourceGenerators
[info] List()
[info] baz / Compile / sourceGenerators
[info] List()
[info] Compile / sourceGenerators
[info] List()
expectation
If we remove the baz project from the build, then foo does have a source generator. This is what I expect.
sbt:sandbox> reload; show Compile/sourceGenerators
[info] welcome to sbt 1.8.2 (Azul Systems, Inc. Java 11.0.17)
[info] loading project definition from /workspace/sandbox/project
[info] loading settings for project sandbox from build.sbt ...
[info] set current project to sandbox (in build file:/workspace/sandbox/)
[info] foo / Compile / sourceGenerators
[info] List(Task(_))
[info] fooAux / Compile / sourceGenerators
[info] List()
[info] bar / Compile / sourceGenerators
[info] List()
[info] Compile / sourceGenerators
[info] List()
notes
Reactions are currently unavailable