aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainProvider.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSourcesProvider.java11
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/python/PythonImportsProvider.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java2
6 files changed, 22 insertions, 12 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainProvider.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainProvider.java
index 988bc4ef15..2c3d755eca 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainProvider.java
@@ -20,6 +20,7 @@ import com.google.devtools.build.lib.analysis.FilesToRunProvider;
import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
import javax.annotation.Nullable;
// Note: AutoValue v1.4-rc1 has AutoValue.CopyAnnotations which makes it work with Skylark. No need
@@ -29,6 +30,7 @@ import javax.annotation.Nullable;
* rules.
*/
@AutoValue
+@AutoCodec
public abstract class ProtoLangToolchainProvider implements TransitiveInfoProvider {
public abstract String commandLine();
@@ -40,6 +42,7 @@ public abstract class ProtoLangToolchainProvider implements TransitiveInfoProvid
public abstract NestedSet<Artifact> blacklistedProtos();
+ @AutoCodec.Instantiator
public static ProtoLangToolchainProvider create(
String commandLine,
FilesToRunProvider pluginExecutable,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSourcesProvider.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSourcesProvider.java
index bf2ed12b3b..a4b5765176 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSourcesProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSourcesProvider.java
@@ -20,6 +20,7 @@ import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
@@ -31,26 +32,28 @@ import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
@AutoValue
@Immutable
@SkylarkModule(name = "ProtoSourcesProvider", doc = "")
+@AutoCodec
public abstract class ProtoSourcesProvider implements TransitiveInfoProvider {
/** The name of the field in Skylark used to access this class. */
public static final String SKYLARK_NAME = "proto";
+ @AutoCodec.Instantiator
public static ProtoSourcesProvider create(
NestedSet<Artifact> transitiveImports,
NestedSet<Artifact> transitiveProtoSources,
- ImmutableList<Artifact> protoSources,
+ ImmutableList<Artifact> directProtoSources,
NestedSet<Artifact> checkDepsProtoSources,
Artifact directDescriptorSet,
NestedSet<Artifact> transitiveDescriptorSets,
- NestedSet<String> protoPathFlags) {
+ NestedSet<String> transitiveProtoPathFlags) {
return new AutoValue_ProtoSourcesProvider(
transitiveImports,
transitiveProtoSources,
- protoSources,
+ directProtoSources,
checkDepsProtoSources,
directDescriptorSet,
transitiveDescriptorSets,
- protoPathFlags);
+ transitiveProtoPathFlags);
}
/**
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java
index be914b547d..1df2e3ee79 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java
@@ -16,12 +16,14 @@ package com.google.devtools.build.lib.rules.proto;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
/**
* Provider that returns SupportData from proto_library used by language-specific protobuf
* generators.
*/
@Immutable
+@AutoCodec
public final class ProtoSupportDataProvider implements TransitiveInfoProvider {
private final SupportData supportData;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java
index 123444c6e5..45dc9af18b 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java
@@ -19,16 +19,16 @@ import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.rules.cpp.CcLinkParamsStore;
import com.google.devtools.build.lib.rules.cpp.CcLinkParamsStore.CcLinkParamsStoreImpl;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
-/**
- * A target that provides C++ libraries to be linked into Python targets.
- */
+/** A target that provides C++ libraries to be linked into Python targets. */
@Immutable
+@AutoCodec
public final class PyCcLinkParamsProvider implements TransitiveInfoProvider {
private final CcLinkParamsStoreImpl store;
- public PyCcLinkParamsProvider(CcLinkParamsStore store) {
- this.store = new CcLinkParamsStoreImpl(store);
+ public PyCcLinkParamsProvider(CcLinkParamsStoreImpl store) {
+ this.store = store;
}
public CcLinkParamsStore getLinkParams() {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonImportsProvider.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonImportsProvider.java
index 03bb52aa70..81a0700c2f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonImportsProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonImportsProvider.java
@@ -16,12 +16,12 @@ package com.google.devtools.build.lib.rules.python;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
import com.google.devtools.build.lib.vfs.PathFragment;
-/**
- * A {@link TransitiveInfoProvider} that supplies import directories for Python dependencies.
- */
+/** A {@link TransitiveInfoProvider} that supplies import directories for Python dependencies. */
@Immutable
+@AutoCodec
public final class PythonImportsProvider implements TransitiveInfoProvider {
private final NestedSet<PathFragment> transitivePythonImports;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java
index 8c6f110d83..ed4fc82f43 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonRunfilesProvider.java
@@ -18,6 +18,7 @@ import com.google.devtools.build.lib.analysis.Runfiles;
import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
/**
* A {@link TransitiveInfoProvider} that supplies runfiles for Python dependencies.
@@ -25,6 +26,7 @@ import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
* <p>Should only be used in proto_library, and even then only until a better mechanism is found.
*/
@Immutable
+@AutoCodec
public final class PythonRunfilesProvider implements TransitiveInfoProvider {
private final Runfiles pythonRunfiles;