From 29ddb5d3bc4e04fb906e492455371d46247abba5 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Sat, 18 Jan 2025 17:13:00 +0100 Subject: [PATCH] add initRecompile for Bazel GitOrigin-RevId: b9a9e9e700fd9fd62b5fb92f5a127ed90bb6798b --- .../jps/incremental/fs/FilesDelta.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/jps/jps-builders/src/org/jetbrains/jps/incremental/fs/FilesDelta.java b/jps/jps-builders/src/org/jetbrains/jps/incremental/fs/FilesDelta.java index a53d1381ac43..411774e29e81 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/incremental/fs/FilesDelta.java +++ b/jps/jps-builders/src/org/jetbrains/jps/incremental/fs/FilesDelta.java @@ -176,6 +176,20 @@ public final class FilesDelta { } } + // used by Bazel + @SuppressWarnings("unused") + public void initRecompile(@NotNull Map> filesToRecompile) { + lockData(); + try { + assert this.filesToRecompile.isEmpty(); + assert this.deletedPaths.isEmpty(); + this.filesToRecompile.putAll(filesToRecompile); + } + finally { + unlockData(); + } + } + public boolean markRecompileIfNotDeleted(@NotNull BuildRootDescriptor root, @NotNull Path file) { lockData(); try { @@ -311,18 +325,4 @@ public final class FilesDelta { unlockData(); } } - - // used by Bazel - @SuppressWarnings("unused") - public void clearRecompile(@NotNull List roots) { - lockData(); - try { - for (BuildRootDescriptor root : roots) { - filesToRecompile.remove(root); - } - } - finally { - unlockData(); - } - } }