diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-25 12:18:36 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-25 12:18:36 -0800 |
commit | 2c0ecb9733dfd231c8d16b819d89d515569f104c (patch) | |
tree | a684db5215e13c7429f1c485307c389f187701d3 /core/src/main | |
parent | e60bbce22af14088dabf0be5a8fa64c1cf9bdf82 (diff) | |
download | mill-2c0ecb9733dfd231c8d16b819d89d515569f104c.tar.gz mill-2c0ecb9733dfd231c8d16b819d89d515569f104c.tar.bz2 mill-2c0ecb9733dfd231c8d16b819d89d515569f104c.zip |
Fix cross-build discovery
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/mill/discover/Mirror.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/scala/mill/discover/Mirror.scala b/core/src/main/scala/mill/discover/Mirror.scala index 792459b1..4dfeaa25 100644 --- a/core/src/main/scala/mill/discover/Mirror.scala +++ b/core/src/main/scala/mill/discover/Mirror.scala @@ -20,7 +20,7 @@ case class Mirror[-T, V](node: (T, List[List[Any]]) => V, crossChildren: Option[(V => List[List[Any]], Mirror[T, _])]){ def labelled(obj: T, p: Seq[Mirror.Segment]) = { val crossValues = p.map{case Mirror.Segment.Cross(vs) => vs case _ => Nil}.toList - targets.map(t => t.labelled(node(obj, crossValues.map(_.toList)), p.reverse)) + targets.map(t => t.labelled(node(obj, crossValues.reverse.map(_.toList)), p.reverse)) } } @@ -39,7 +39,7 @@ object Mirror{ h.children.flatMap{case (label, c) => rec(Segment.Label(label) :: segmentsRev, c)} ++ h.crossChildren.toSeq.flatMap{ case (crossGen, c) => - crossGen(h.node(t, crossValues.map(_.toList))).flatMap(cross => + crossGen(h.node(t, crossValues.reverse.map(_.toList))).flatMap(cross => rec(Segment.Cross(cross) :: segmentsRev, c) ) } |