aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-02-28 09:18:36 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-28 09:20:24 -0800
commit1fe23126d4a30d49b7668b235ea1bfb2e2c8a39e (patch)
tree7807839ba173ef69dd87e5933f0419767ab327e0 /src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
parente959e44a4363fc12ae2df2c5bc0cd0d12f80bbd9 (diff)
Deletes AutoCodec.Strategy.SINGLETON now that we have @AutoCodec field tags.
This also gets rid of some static initialization cycles which we should try very hard to avoid in the future. PiperOrigin-RevId: 187334087
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
index 0c78c40146..c76a7ad8e1 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
@@ -38,12 +38,17 @@ import com.google.devtools.build.skyframe.SkyValue;
*/
public abstract class PackageLookupValue implements SkyValue {
+ @AutoCodec
public static final NoBuildFilePackageLookupValue NO_BUILD_FILE_VALUE =
- NoBuildFilePackageLookupValue.INSTANCE;
+ new NoBuildFilePackageLookupValue();
+
+ @AutoCodec
public static final DeletedPackageLookupValue DELETED_PACKAGE_VALUE =
- DeletedPackageLookupValue.INSTANCE;
+ new DeletedPackageLookupValue();
+
+ @AutoCodec
public static final NoRepositoryPackageLookupValue NO_SUCH_REPOSITORY_VALUE =
- NoRepositoryPackageLookupValue.INSTANCE;
+ new NoRepositoryPackageLookupValue();
enum ErrorReason {
/** There is no BUILD file. */
@@ -191,10 +196,7 @@ public abstract class PackageLookupValue implements SkyValue {
}
/** Marker value for no build file found. */
- @AutoCodec(strategy = AutoCodec.Strategy.SINGLETON)
public static class NoBuildFilePackageLookupValue extends UnsuccessfulPackageLookupValue {
- static final NoBuildFilePackageLookupValue INSTANCE = new NoBuildFilePackageLookupValue();
-
private NoBuildFilePackageLookupValue() {
}
@@ -317,10 +319,7 @@ public abstract class PackageLookupValue implements SkyValue {
}
/** Marker value for a deleted package. */
- @AutoCodec(strategy = AutoCodec.Strategy.SINGLETON)
public static class DeletedPackageLookupValue extends UnsuccessfulPackageLookupValue {
- static final DeletedPackageLookupValue INSTANCE = new DeletedPackageLookupValue();
-
private DeletedPackageLookupValue() {
}
@@ -339,10 +338,7 @@ public abstract class PackageLookupValue implements SkyValue {
* Marker value for repository we could not find. This can happen when looking for a label that
* specifies a non-existent repository.
*/
- @AutoCodec(strategy = AutoCodec.Strategy.SINGLETON)
public static class NoRepositoryPackageLookupValue extends UnsuccessfulPackageLookupValue {
- static final NoRepositoryPackageLookupValue INSTANCE = new NoRepositoryPackageLookupValue();
-
private NoRepositoryPackageLookupValue() {}
@Override