Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Nov 11, 2024
1 parent a952470 commit 6dc5338
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions runner/src/mill/runner/MillBuildBootstrap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,11 @@ object MillBuildBootstrap {
): (Either[String, Seq[Any]], Seq[Watchable], Seq[Watchable]) = {
rootModule.evalWatchedValues.clear()
val previousClassloader = Thread.currentThread().getContextClassLoader
val evalTaskResult = try {
Thread.currentThread().setContextClassLoader(rootModule.getClass.getClassLoader)
RunScript.evaluateTasksNamed(evaluator, targetsAndParams, SelectMode.Separated)
} finally Thread.currentThread().setContextClassLoader(previousClassloader)
val evalTaskResult =
try {
Thread.currentThread().setContextClassLoader(rootModule.getClass.getClassLoader)
RunScript.evaluateTasksNamed(evaluator, targetsAndParams, SelectMode.Separated)
} finally Thread.currentThread().setContextClassLoader(previousClassloader)
val moduleWatched = rootModule.watchedValues.toVector
val addedEvalWatched = rootModule.evalWatchedValues.toVector

Expand Down

0 comments on commit 6dc5338

Please sign in to comment.