aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
index 94e7ae0bf3..2823f9632a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
@@ -416,8 +416,15 @@ public final class SkylarkRuleContext {
return ruleContext.getAnalysisEnvironment().getDerivedArtifact(fragment, root);
}
- @SkylarkCallable(doc = "Creates a new file object, derived from the given file and suffix. "
- + DOC_NEW_FILE_TAIL)
+ @SkylarkCallable(doc =
+ "Creates a new file object, derived from the given file and suffix. " + DOC_NEW_FILE_TAIL)
+ public Artifact newFileSuffix(Artifact baseArtifact, String suffix) {
+ return newFile(baseArtifact, suffix);
+ }
+
+ @SkylarkCallable(doc =
+ "Creates a new file object, derived from the given file and suffix. " + DOC_NEW_FILE_TAIL
+ + " Deprecated: Please use ctx.new_file_suffix() instead.")
public Artifact newFile(Artifact baseArtifact, String suffix) {
PathFragment original = baseArtifact.getRootRelativePath();
PathFragment fragment = original.replaceName(original.getBaseName() + suffix);