Open keynmol opened 3 years ago
Maybe you need to add publish / skip := true
?
Doesn't have effect, same with publish := {}
.
In fact, if you look at the projects created:
[info] api
[info] core
[info] * tmp-jrfolkaw
tmp-jrfolkaw
- is the temp folder I run this in. Which means root
was not created at all.
Which makes sense, because just calling aggregate doesn't create any rows, so the project is not registered at all (because it iterates over rows
here).
At the same time, you can't really synthesise project rows for root project from aggregatees, right?
I think this needs to have 4 scenarios during projects generation:
.aggregate
to generated projectWDYT?
- if rows is empty and aggregates is non-empty -> generate 1 project which just does aggregation, don't mangle the name of that project
I am not 100% sure, but I have a feeling that adding this inconsistency would end up making the design weaker. Maybe we could add some method that adds a dummy row?
At the moment the aggregation works differently for project matrices.
The most common situation I've seen this become a problem is running
sbt publish
and aggregated project failing withRepository for publishing is not specified
.workaround
To circumvent it, one must go a different route:
Which behaves as you expect:
With the downside of not being more verbose, of course
solution
TBD, I haven't looked at the code in detail yet to understand why this happens.
Suspect that this:
https://github.com/sbt/sbt-projectmatrix/blob/e46c2e3c3a4eba186a204303834e5d01893455b7/src/main/scala/sbt/internal/ProjectMatrix.scala#L249-L250
is to blame.
Not sure what's the best way to solve this?