From 522e149b6774c2d4c6c9b5229fca2b5143609ce9 Mon Sep 17 00:00:00 2001 From: Mihai Toader Date: Wed, 4 Sep 2024 00:47:46 -0700 Subject: [PATCH] [#6721] Don't set `ExternalWorkspace.repoName()` to null when unchanged --- .../base/model/ExternalWorkspaceData.java | 6 ++--- .../model/primitives/ExternalWorkspace.java | 25 +++++++------------ ...ExternalWorkspaceReferenceBzlModeTest.java | 3 +-- .../blaze/base/ExternalWorkspaceFixture.java | 12 ++++----- 4 files changed, 19 insertions(+), 27 deletions(-) diff --git a/base/src/com/google/idea/blaze/base/model/ExternalWorkspaceData.java b/base/src/com/google/idea/blaze/base/model/ExternalWorkspaceData.java index 9d5424a259b..5834842ea8a 100644 --- a/base/src/com/google/idea/blaze/base/model/ExternalWorkspaceData.java +++ b/base/src/com/google/idea/blaze/base/model/ExternalWorkspaceData.java @@ -9,7 +9,6 @@ import javax.annotation.Nullable; - public final class ExternalWorkspaceData implements ProtoWrapper { public ImmutableMap workspaces; @@ -25,14 +24,15 @@ public static ExternalWorkspaceData create(ImmutableList work .stream() .collect( ImmutableMap.toImmutableMap( - ExternalWorkspace::repositoryName, + ExternalWorkspace::repoName, Functions.identity())) ); } @Override public ProjectData.ExternalWorkspaceData toProto() { - ProjectData.ExternalWorkspaceData.Builder builder = ProjectData.ExternalWorkspaceData.newBuilder(); + ProjectData.ExternalWorkspaceData.Builder builder = + ProjectData.ExternalWorkspaceData.newBuilder(); for (ExternalWorkspace externalWorkspace : workspaces.values()) { builder = builder.addWorkspaces(externalWorkspace.toProto()); diff --git a/base/src/com/google/idea/blaze/base/model/primitives/ExternalWorkspace.java b/base/src/com/google/idea/blaze/base/model/primitives/ExternalWorkspace.java index ce4b1fe9308..8f1ed868b89 100644 --- a/base/src/com/google/idea/blaze/base/model/primitives/ExternalWorkspace.java +++ b/base/src/com/google/idea/blaze/base/model/primitives/ExternalWorkspace.java @@ -12,12 +12,7 @@ public abstract class ExternalWorkspace implements ProtoWrapper