Merged
Conversation
**Problem** For sbt 1.x, the user is forced to pick between having a stable ID for the root project, or having the automatic aggregation of all subprojects. The problem becomes more pronounced for large build that frequent add/remove subprojects. **Solution** This implements `.autoAggregate` method on `Project`, which is implemented as `this.aggregate(LocalAggregate)`. At the loading time, we can automatically expand `LocalAggregate` to a list of subproject references, after we discover all subprojects. The `autoAggregate` will use the base directory of the subproject to pick the parent-child relationship. For example, a root project would aggregate all subprojects, but `bar` might aggregate only `bar/bar1` and `bar/bar2`.
40d346b to
748bf12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4510
Problem
For sbt 1.x, the user is forced to pick between having a stable ID for the root project, or having the automatic aggregation of all subprojects. The problem becomes more pronounced for large build that frequent add/remove subprojects.
Solution
This implements
.autoAggregatemethod onProject, which is implemented asthis.aggregate(LocalAggregate).At the loading time, we can automatically expand
LocalAggregateto a list of subproject references, after we discover all subprojects.The
autoAggregatewill use the base directory of the subproject to pick the parent-child relationship. For example, a root project would aggregate all subprojects, butbarmight aggregate onlybar/bar1andbar/bar2.