diff options
author | 2015-04-01 18:13:45 +0000 | |
---|---|---|
committer | 2015-04-02 12:49:25 +0000 | |
commit | fbeff9609f2c4db0ccb0cc530be98696982d8973 (patch) | |
tree | 8f88c5b3806cc3f413b6da07eee1605088fadedf /src | |
parent | a924c8057ed886fd27b6099eeada366d1823d30b (diff) |
Clean up an unnecessary field in NoSuchTargetException.
--
MOS_MIGRATED_REVID=90081310
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/NoSuchTargetException.java | 6 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/NoSuchTargetException.java b/src/main/java/com/google/devtools/build/lib/packages/NoSuchTargetException.java index 4e8482424a..ab89d77224 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/NoSuchTargetException.java +++ b/src/main/java/com/google/devtools/build/lib/packages/NoSuchTargetException.java @@ -28,7 +28,6 @@ public class NoSuchTargetException extends NoSuchThingException { // TODO(bazel-team): rename/refactor this class and NoSuchPackageException since it's confusing // that they embed Target/Package instances. @Nullable private final Target target; - private final boolean packageLoadedSuccessfully; public NoSuchTargetException(String message) { this(null, message); @@ -48,7 +47,6 @@ public class NoSuchTargetException extends NoSuchThingException { super(message, nspe); this.label = label; this.target = target; - this.packageLoadedSuccessfully = nspe == null; } @Nullable @@ -63,8 +61,4 @@ public class NoSuchTargetException extends NoSuchThingException { public Target getTarget() { return target; } - - public boolean getPackageLoadedSuccessfully() { - return packageLoadedSuccessfully; - } } diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java index 8e818f3df1..8f1838a22d 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java @@ -79,15 +79,17 @@ public class TransitiveTargetFunction implements SkyFunction { if (target == null) { throw new TransitiveTargetFunctionException(e); } + + // So we now have a Target here, but the only way for that to happen is if the package loaded + // at least partially, but had an error. successfulTransitiveLoading = false; transitiveRootCauses.add(label); errorLoadingTarget = e; - packageLoadedSuccessfully = e.getPackageLoadedSuccessfully(); + packageLoadedSuccessfully = false; } catch (NoSuchPackageException e) { throw new TransitiveTargetFunctionException(e); } catch (NoSuchThingException e) { - throw new IllegalStateException(e - + " not NoSuchTargetException or NoSuchPackageException"); + throw new IllegalStateException(e + " not NoSuchTargetException or NoSuchPackageException"); } NestedSetBuilder<PackageIdentifier> transitiveSuccessfulPkgs = NestedSetBuilder.stableOrder(); |