sbt / sbt-projectmatrix

MIT License
124 stars 14 forks source link

The plugin creates empty folders for every project in the matrix #3

Closed agemooij closed 4 years ago

agemooij commented 6 years ago

When executing any aggregate task on a multi-project build using the projectmatrix plugin, the plugin creates a whole series of empty directories in the project root directory, one for each "virtual" project using the full id.

So if I have a root project that aggregates sub-projects A (id = foo-a, base = file("a")), B, and C, and I configure them to cross-compile for 2.11 and 2.12, then the plugin will create the following directories:

These directories are completely empty and of course they produce a lot of unwanted noise.

agemooij commented 6 years ago

I've validated that this occurs immediately upon sbt (shell) startup and not as a side effect of running subsequent commands in the shell.

LukaszByczynski commented 6 years ago

is there any workaround for that issue ? I mean, maybe there is a flag in sbt @eed3si9n

kevinwright commented 5 years ago

The problem would appear to be here:

https://github.com/sbt/sbt-projectmatrix/blob/master/src/main/scala/sbt/ProjectMatrix.scala#L146

I have no idea why we're specifying the non-existent directory new sbt.File(childId).getAbsoluteFile as the root for derived projects. If nothing else, it's probably also the reason why IntelliJ hates projectmatrix builds so much.