diff --git a/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala b/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala index 5f053f5fadb..359f842ad62 100644 --- a/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala +++ b/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala @@ -592,9 +592,8 @@ private class MillBuildServer( override def buildTargetCleanCache(cleanCacheParams: CleanCacheParams) : CompletableFuture[CleanCacheResult] = completable(s"buildTargetCleanCache ${cleanCacheParams}") { state => - val targetIds = state.rootModules.map { case b: BspModule => state.bspIdByModule(b) } val (msg, cleaned) = - cleanCacheParams.getTargets.asScala.filter(targetIds.contains).foldLeft(( + cleanCacheParams.getTargets.asScala.foldLeft(( "", true )) {