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 @@ -86,6 +86,14 @@ class MillBuildBootstrap(
8686 }
8787
8888 def evaluateRec (depth : Int ): RunnerState = {
89+
90+ // We need relocatable PathRef for meta-builds for a stable classpathSig
91+ MappedRoots .requireMappedPaths(
92+ mill.constants.PathVars .WORKSPACE ,
93+ mill.constants.PathVars .HOME ,
94+ mill.constants.PathVars .MILL_OUT
95+ )
96+
8997 logger.withChromeProfile(s " meta-level $depth" ) {
9098 // println(s"+evaluateRec($depth) " + recRoot(projectRoot, depth))
9199 val currentRoot = recRoot(projectRoot, depth)
You can’t perform that action at this time.
0 commit comments