aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-02-23 15:41:52 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-23 15:43:54 -0800
commitbbbf3dce2b95f054c8f2e85746b6b50b47740f61 (patch)
tree04d99f077d117a513d97651526c77cccada47b53 /src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java
parent62476a2738456c14bf92b6bcc81ade2c93ca7e87 (diff)
Integrates CodecScanner into SkyValueEncoder.
* Deletes a number of CODEC references, now superceded by registry functionality. * Minimal SkyKeySerializer modifications for correctness, as certain codec changes require codecs to be in available in the registry. PiperOrigin-RevId: 186834520
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java
index 74f94bf117..59b1201831 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/RecursivePkgValue.java
@@ -21,6 +21,8 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.collect.nestedset.Order;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
+import com.google.devtools.build.lib.skyframe.serialization.ObjectCodec;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.RootedPath;
import com.google.devtools.build.skyframe.LegacySkyKey;
@@ -69,19 +71,26 @@ public class RecursivePkgValue implements SkyValue {
/**
* A RecursivePkgKey is a tuple of a {@link RootedPath}, {@code rootedPath}, defining the
* directory to recurse beneath in search of packages, and an {@link ImmutableSet} of {@link
- * PathFragment}s, {@code excludedPaths}, relative to {@code rootedPath.getRoot}, defining the
- * set of subdirectories strictly beneath {@code rootedPath} to skip.
+ * PathFragment}s, {@code excludedPaths}, relative to {@code rootedPath.getRoot}, defining the set
+ * of subdirectories strictly beneath {@code rootedPath} to skip.
*
- * <p>Throws {@link IllegalArgumentException} if {@code excludedPaths} contains any paths that
- * are equal to {@code rootedPath} or that are not beneath {@code rootedPath}.
+ * <p>Throws {@link IllegalArgumentException} if {@code excludedPaths} contains any paths that are
+ * equal to {@code rootedPath} or that are not beneath {@code rootedPath}.
*/
+ @AutoCodec
@ThreadSafe
public static final class RecursivePkgKey implements Serializable {
+ public static final ObjectCodec<RecursivePkgKey> CODEC =
+ new RecursivePkgValue_RecursivePkgKey_AutoCodec();
+
private final RepositoryName repositoryName;
private final RootedPath rootedPath;
private final ImmutableSet<PathFragment> excludedPaths;
- public RecursivePkgKey(RepositoryName repositoryName, RootedPath rootedPath,
+ @AutoCodec.Instantiator
+ public RecursivePkgKey(
+ RepositoryName repositoryName,
+ RootedPath rootedPath,
ImmutableSet<PathFragment> excludedPaths) {
PathFragment.checkAllPathsAreUnder(excludedPaths, rootedPath.getRootRelativePath());
Preconditions.checkState(!repositoryName.isDefault());