diff options
author | kchodorow <kchodorow@google.com> | 2017-04-22 15:07:22 -0400 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2017-05-23 15:37:55 -0400 |
commit | 85ae1905d4abfcd214bd53d6cd3d032ff246daf6 (patch) | |
tree | 38b2220246c55d721cfc8f7d3c6940b154c4b649 /src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java | |
parent | e7e561850428638c7e919eb1cfc850e71748b6dc (diff) |
Automated g4 rollback of commit c4134802dd15d6ef5cca6521f6bf6aac395ee2ad.
*** Reason for rollback ***
Roll forward of directory name change
*** Original change description ***
Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b.
*** Reason for rollback ***
Breaks //src/test/shell/integration:force_delete_output_test
*** Original change description ***
Symlink output directories to the correct directory name
If the workspace directory is /path/to/my/proj and the name in the WORKSPACE
file is "floop", this will symlink the output directories to
output_base/execroot/floop instead of output_base/execroot/proj.
More prep for #1262, fixes #1681.
PiperOrigin-RevId: 156892980
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java index 668c636b50..4da943b6ab 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceNameValue.java @@ -18,7 +18,6 @@ import com.google.devtools.build.skyframe.LegacySkyKey; import com.google.devtools.build.skyframe.SkyKey; import com.google.devtools.build.skyframe.SkyValue; import java.util.Objects; -import javax.annotation.Nullable; /** * A value that solely represents the 'name' of a Bazel workspace, as defined in the WORKSPACE file. @@ -31,20 +30,17 @@ import javax.annotation.Nullable; public class WorkspaceNameValue implements SkyValue { private static final SkyKey KEY = LegacySkyKey.create(SkyFunctions.WORKSPACE_NAME, DummyArgument.INSTANCE); - private static final WorkspaceNameValue ERROR = new WorkspaceNameValue(null); - @Nullable private final String workspaceName; - private WorkspaceNameValue(@Nullable String workspaceName) { + private WorkspaceNameValue(String workspaceName) { this.workspaceName = workspaceName; } /** - * Returns the name of the workspace, or {@code null} if there was an error in the WORKSPACE file. + * Returns the name of the workspace. */ - @Nullable - public String maybeGetName() { + public String getName() { return workspaceName; } @@ -53,11 +49,6 @@ public class WorkspaceNameValue implements SkyValue { return KEY; } - /** Returns a {@link WorkspaceNameValue} for a workspace whose WORKSPACE file is in error. */ - public static WorkspaceNameValue withError() { - return WorkspaceNameValue.ERROR; - } - /** Returns a {@link WorkspaceNameValue} for a workspace with the given name. */ public static WorkspaceNameValue withName(String workspaceName) { return new WorkspaceNameValue(Preconditions.checkNotNull(workspaceName)); @@ -84,7 +75,7 @@ public class WorkspaceNameValue implements SkyValue { /** Singleton class used as the {@link SkyKey#argument} for {@link WorkspaceNameValue#key}. */ public static final class DummyArgument { - public static final int HASHCODE = DummyArgument.class.getCanonicalName().hashCode(); + static final int HASHCODE = DummyArgument.class.getCanonicalName().hashCode(); public static final DummyArgument INSTANCE = new DummyArgument(); private DummyArgument() { |