Automated rollback of commit 8cb1d2fb460a9caf47df58d7ff051d31080a77cb.
*** Reason for rollback ***
Roll forward again without the changes to expand_location, but with the trimming fix from https://github.com/bazelbuild/bazel/commit/19617360121635a77ffec99b84d825e7d9b260b1.
*** Original change description ***
Automated rollback of commit ca77f608e486bf7aa762565d25bf7b9e30f2268c.
This also rolls back unknown commit.
*** Reason for rollback ***
Affected expand_location Skylark API semantics - it no longer accepts ${abc} or plain dollar signs, but complains.
*** Original change description ***
Extend TemplateExpander to handle $(func param) expansion
Rewrite the Expander to use the new functionality; also rewrite the Skylark
expand_location function to use it.
PiperOrigin-RevId: 174384095
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index 312cccc..d4c2a67 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -48,6 +48,7 @@
import com.google.devtools.build.lib.analysis.config.PatchTransition;
import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget.Mode;
import com.google.devtools.build.lib.analysis.fileset.FilesetProvider;
+import com.google.devtools.build.lib.analysis.stringtemplate.TemplateContext;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.RepositoryName;
import com.google.devtools.build.lib.collect.ImmutableSortedKeyListMultimap;
@@ -954,8 +955,8 @@
initConfigurationMakeVariableContext(ImmutableList.copyOf(makeVariableSuppliers));
}
- public Expander getExpander(ConfigurationMakeVariableContext makeVariableContext) {
- return new Expander(this, makeVariableContext);
+ public Expander getExpander(TemplateContext templateContext) {
+ return new Expander(this, templateContext);
}
public Expander getExpander() {