Skip to content

Commit 4fd6140

Browse files
Googlercopybara-github
Googler
authored andcommitted
Specify the name of the rule in the "Rule is unimplemented." error.
PiperOrigin-RevId: 750107659 Change-Id: I1a6d4d679ef836190c4adc76cff2676c27098347
1 parent f5701a7 commit 4fd6140

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ public ConfiguredTarget create(RuleContext ruleContext) {
644644
"""
645645
.formatted(ruleName, bzlLoadLabel, ruleName));
646646
} else {
647-
ruleContext.ruleError("Rule is unimplemented.");
647+
ruleContext.ruleError("Rule '" + ruleName + "' is unimplemented.");
648648
}
649649
return null;
650650
}

src/test/java/com/google/devtools/build/lib/rules/python/PyTestConfiguredTargetTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void nativePyTestReportsAnError() throws Exception {
9595
if (analysisMock.isThisBazel()) {
9696
assertThat(error).hasMessageThat().contains("name 'py_test' is not defined");
9797
} else {
98-
assertThat(error).hasMessageThat().contains("Rule is unimplemented.");
98+
assertThat(error).hasMessageThat().contains("Rule 'py_test' is unimplemented.");
9999
}
100100
}
101101
}

0 commit comments

Comments
 (0)