From 4af309d4b24f65994481203211c6ea7bec388bed Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 27 Dec 2017 10:11:54 -0800 Subject: ObjectCodecs for all non-test FragmentOption subclasses. PiperOrigin-RevId: 180202221 --- .../lib/analysis/config/BuildConfiguration.java | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java') diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index 785a54e88c..f41ff41836 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -50,6 +50,8 @@ import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.packages.RuleClassProvider; import com.google.devtools.build.lib.packages.Target; +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.skylarkinterface.SkylarkCallable; import com.google.devtools.build.lib.skylarkinterface.SkylarkModule; import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory; @@ -430,18 +432,21 @@ public class BuildConfiguration implements BuildEvent { /** * Options that affect the value of a BuildConfiguration instance. * - *

(Note: any client that creates a view will also need to declare - * BuildView.Options, which affect the mechanism of view construction, - * even if they don't affect the value of the BuildConfiguration instances.) + *

(Note: any client that creates a view will also need to declare BuildView.Options, which + * affect the mechanism of view construction, even if they don't affect the value of the + * BuildConfiguration instances.) * - *

IMPORTANT: when adding new options, be sure to consider whether those - * values should be propagated to the host configuration or not. + *

IMPORTANT: when adding new options, be sure to consider whether those values should be + * propagated to the host configuration or not. * - *

ALSO IMPORTANT: all option types MUST define a toString method that - * gives identical results for semantically identical option values. The - * simplest way to ensure that is to return the input string. + *

ALSO IMPORTANT: all option types MUST define a toString method that gives identical results + * for semantically identical option values. The simplest way to ensure that is to return the + * input string. */ + @AutoCodec(strategy = AutoCodec.Strategy.PUBLIC_FIELDS) public static class Options extends FragmentOptions implements Cloneable { + public static final ObjectCodec CODEC = new BuildConfiguration_Options_AutoCodec(); + @Option( name = "experimental_separate_genfiles_directory", defaultValue = "true", -- cgit v1.2.3