diff --git a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkTransition.java b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkTransition.java index 317225b133a4dd..0cf754541bcfd0 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkTransition.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkTransition.java @@ -267,13 +267,16 @@ public static Map validate( Map buildSettingPackages, Map toOptions) throws TransitionException { - // collect settings changed during this transition and their types + // Collect settings changed during this transition and their types. This includes settings that + // were only used as inputs as to the transition and thus had their default values added to the + // fromOptions, which in case of a no-op transition directly end up in toOptions. Map changedSettingToRule = Maps.newHashMap(); root.visit( (StarlarkTransitionVisitor) transition -> { ImmutableSet