Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding subproject causes setting to no longer be evaluated (?) #7173

Open
armanbilge opened this issue Mar 10, 2023 · 1 comment
Open

Adding subproject causes setting to no longer be evaluated (?) #7173

armanbilge opened this issue Mar 10, 2023 · 1 comment
Labels

Comments

@armanbilge
Copy link
Contributor

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 = project

problem

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

@armanbilge armanbilge added the Bug label Mar 10, 2023
@eed3si9n
Copy link
Member

That's strange.

armanbilge added a commit to gemini-hlsw/clue that referenced this issue Mar 27, 2023
armanbilge added a commit to gemini-hlsw/clue that referenced this issue Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants