Mill documentation says
Sources are defined using T.sources {…}, taking one-or-more os.Paths as arguments. A Source is a subclass of Target[Seq[PathRef]]
So this is possible in mill v0.9.9
def sourceRoots: Sources = T.sources { os.pwd / "src" }
and this
def sourceRoots: Sources = T.sources ( os.pwd / "src", os.pwd / "foobar" )
but these do not compile:
def sourceRoots = T.sources { os.pwd / "src", os.pwd / "foobar" }
def sourceRoots = T.sources { Seq(os.pwd / "src", os.pwd / "foobar") }
def sourceRoots = T.sources { Seq(os.pwd / "src", os.pwd / "foobar") : _* }
def sourceRoots = T.sources ( Seq(os.pwd / "src", os.pwd / "foobar") )
def sourceRoots = T.sources ( Seq(os.pwd / "src", os.pwd / "foobar") : _* )
Is it somehow possible to create def sourceRoots: Sources = T.sources ...
from a seq of paths?
There are two overloads for
T.sources
construction. One acceptsos.Path
s, the other one accepts aSeq[mill.api.PathRef]
.To create a
T.sources
from aSeq[os.Path]
, do the following: