File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
runner/daemon/src/mill/daemon Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -78,4 +78,17 @@ trait MappedRootsImpl {
7878 }
7979 }
8080
81+ /**
82+ * Use this to assert at runtime, that a root path with the given `key` is defined.
83+ * @throws NoSuchElementException when no path was mapped under the given `key`.
84+ */
85+ def requireMappedPaths (key : String * ): Unit = {
86+ val map = toMap
87+ for {
88+ singleKey <- key
89+ } {
90+ if (! map.contains(singleKey)) throw new NoSuchElementException (s " No root path mapping defined for ' ${key}' " )
91+ }
92+ }
93+
8194}
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ class MillBuildBootstrap(
8787 }
8888
8989 def evaluateRec (depth : Int ): RunnerState = {
90+
91+ // We need relocatable PathRef for meta-builds for a stable classpathSig
92+ MappedRoots .requireMappedPaths(
93+ mill.constants.PathVars .WORKSPACE ,
94+ mill.constants.PathVars .HOME ,
95+ mill.constants.PathVars .MILL_OUT
96+ )
97+
9098 logger.withChromeProfile(s " meta-level $depth" ) {
9199 // println(s"+evaluateRec($depth) " + recRoot(projectRoot, depth))
92100 val currentRoot = recRoot(projectRoot, depth)
You can’t perform that action at this time.
0 commit comments