From 6c3847d81b242e38b2ae521954a612c839535ef1 Mon Sep 17 00:00:00 2001 From: Evgenii Novozhilov Date: Mon, 8 Dec 2025 19:40:36 +0200 Subject: [PATCH] cleanup logs from NoSuchFileException errors this turned out to be ok to have these files as nonexisting because rulesets might point to additional locations which do not contain files we're looking for --- .../blaze/base/sync/workspace/ArtifactLocationDecoderImpl.java | 3 +++ .../base/sync/workspace/ExecutionRootPathResolverImpl.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/base/src/com/google/idea/blaze/base/sync/workspace/ArtifactLocationDecoderImpl.java b/base/src/com/google/idea/blaze/base/sync/workspace/ArtifactLocationDecoderImpl.java index 6b90a27780c..d057d58f854 100644 --- a/base/src/com/google/idea/blaze/base/sync/workspace/ArtifactLocationDecoderImpl.java +++ b/base/src/com/google/idea/blaze/base/sync/workspace/ArtifactLocationDecoderImpl.java @@ -25,6 +25,7 @@ import com.intellij.openapi.util.io.FileUtil; import java.io.File; import java.io.IOException; +import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Objects; @@ -98,6 +99,8 @@ public File decode(ArtifactLocation artifactLocation) { if (pathResolver.getWorkspacePath(realFile) != null) { return realFile; } + } catch (NoSuchFileException ignore) { + // this is ok as it might not exist } catch (IOException ioException) { LOG.warn("Failed to resolve real path for " + artifactLocation.getExecutionRootRelativePath() + "\n" + ioException.getClass().getSimpleName() + ": " + ioException.getMessage()); diff --git a/base/src/com/google/idea/blaze/base/sync/workspace/ExecutionRootPathResolverImpl.java b/base/src/com/google/idea/blaze/base/sync/workspace/ExecutionRootPathResolverImpl.java index ade375adff9..b65b1020b26 100644 --- a/base/src/com/google/idea/blaze/base/sync/workspace/ExecutionRootPathResolverImpl.java +++ b/base/src/com/google/idea/blaze/base/sync/workspace/ExecutionRootPathResolverImpl.java @@ -24,6 +24,7 @@ import com.intellij.openapi.diagnostic.Logger; import java.io.File; import java.io.IOException; +import java.nio.file.NoSuchFileException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.VisibleForTesting; @@ -131,6 +132,8 @@ public ImmutableList resolveToExternalWorkspaceWithSymbolicLinkResolution( if (workspacePathResolver.getWorkspacePath(realPath) != null) { return ImmutableList.of(realPath); } + } catch (NoSuchFileException ignore) { + // this is ok as it might not exist } catch (IOException ioException) { LOG.warn("Failed to resolve real path for " + pathInExecutionRoot, ioException); }