|
13 | 13 | // limitations under the License. |
14 | 14 | package com.google.devtools.build.lib.skyframe; |
15 | 15 |
|
16 | | - |
17 | 16 | import com.google.common.base.MoreObjects; |
18 | 17 | import com.google.devtools.build.lib.analysis.ConfiguredTarget; |
19 | 18 | import com.google.devtools.build.lib.analysis.ConfiguredTargetValue; |
20 | | -import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget; |
21 | 19 | import com.google.devtools.build.lib.collect.nestedset.NestedSet; |
22 | 20 | import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; |
23 | 21 | import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe; |
24 | 22 | import com.google.devtools.build.lib.packages.Package; |
25 | 23 | import com.google.devtools.build.lib.packages.TargetData; |
26 | | -import com.google.devtools.build.lib.skyframe.serialization.VisibleForSerialization; |
27 | | -import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec; |
28 | 24 | import javax.annotation.Nullable; |
29 | 25 |
|
30 | 26 | /** A non-rule configured target in the context of a Skyframe graph. */ |
31 | 27 | @Immutable |
32 | 28 | @ThreadSafe |
33 | | -// Reached via all ConfiguredTarget implementations except RuleConfiguredTarget. |
34 | | -@AutoCodec(explicitlyAllowClass = RuleConfiguredTarget.class) |
35 | 29 | public final class NonRuleConfiguredTargetValue |
36 | 30 | extends AbstractConfiguredTargetValue<ConfiguredTarget> implements ConfiguredTargetValue { |
37 | 31 |
|
38 | | - private TargetData targetData; |
39 | | - |
40 | | - @AutoCodec.Instantiator |
41 | | - @VisibleForSerialization |
42 | | - NonRuleConfiguredTargetValue( |
43 | | - ConfiguredTarget configuredTarget) { |
44 | | - // Transitive packages are not serialized. |
45 | | - this(configuredTarget, null); |
46 | | - } |
| 32 | + @Nullable // Non-null when this is an alias of a remotely fetched ConfiguredTarget. |
| 33 | + private final TargetData targetData; |
47 | 34 |
|
48 | 35 | NonRuleConfiguredTargetValue( |
49 | 36 | ConfiguredTarget configuredTarget, @Nullable NestedSet<Package.Metadata> transitivePackages) { |
50 | 37 | super(configuredTarget, transitivePackages); |
| 38 | + this.targetData = null; |
51 | 39 | } |
52 | 40 |
|
53 | 41 | NonRuleConfiguredTargetValue( |
|
0 commit comments