diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-15 11:39:00 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-15 11:43:48 -0800 |
commit | e5c313e12faf3ccf90aa7f69eb2eb16f8add782f (patch) | |
tree | 707bb843399219177023e43e680b6f0ad45544ec /core/src/main/scala | |
parent | 09bdc885cf6d07a531e78827f168affb31fa90b5 (diff) | |
download | mill-e5c313e12faf3ccf90aa7f69eb2eb16f8add782f.tar.gz mill-e5c313e12faf3ccf90aa7f69eb2eb16f8add782f.tar.bz2 mill-e5c313e12faf3ccf90aa7f69eb2eb16f8add782f.zip |
Add some test cases for nested target discovery, which also implicitly tests nested module discovery
Diffstat (limited to 'core/src/main/scala')
-rw-r--r-- | core/src/main/scala/mill/define/Module.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/scala/mill/define/Module.scala b/core/src/main/scala/mill/define/Module.scala index 33d0e267..3d3bb87c 100644 --- a/core/src/main/scala/mill/define/Module.scala +++ b/core/src/main/scala/mill/define/Module.scala @@ -43,12 +43,12 @@ object Module{ lazy val segmentsToModules = traverse{m => Seq(m.millModuleSegments -> m)} .toMap - lazy val segmentsToTargets = traverse{_.millInternal.reflect[Target[_]]} + lazy val targets = traverse{_.millInternal.reflect[Target[_]]}.toSet + + lazy val segmentsToTargets = targets .map(t => (t.ctx.segments, t)) .toMap - lazy val targets = segmentsToTargets.valuesIterator.toSet - // Ensure we do not propagate the implicit parameters as implicits within // the body of any inheriting class/trait/objects, as it would screw up any // one else trying to use sourcecode.{Enclosing,Line} to capture debug info |