-
Notifications
You must be signed in to change notification settings - Fork 1k
Root project: auto-aggregation vs stable id #4510
Description
There's tension for the root project between auto-aggregation and stable id. If you don't declare the root project (which you do, for example, like so: val bippy = project in file(".")) then it auto-aggregates all the projects in the build, but it also doesn't have a stable id, because it depends on the directory it's in, which could break scripts. This is present in current sbt 1.2.8, but it's been there since auto-aggregation was added which was ~ the 0.13.5 days.
I think the easiest way to fix this is to allow to opt back into auto-aggregation with a .withAutoAggregation method on Project.
Ideally, one could define the root project's id with something like RootProject / id := "...", but that's a setting and project's are defined before their settings are even added, let alone evaluated.
Another option could be to just make build loading fail if the root project's id is unstable, but that might be too strict (and too late to change.)