Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analysis_test expect_failure does not work for rules with outputs #134

Closed
c-parsons opened this issue Mar 21, 2019 · 0 comments
Closed

analysis_test expect_failure does not work for rules with outputs #134

c-parsons opened this issue Mar 21, 2019 · 0 comments
Assignees

Comments

@c-parsons
Copy link
Collaborator

It looks as if an analysis test depending on a rule with an implicit rule output, such as the example:

custom_rule = rule(
    implementation = custom_rule_impl,
    outputs = {'my_output': '%{name}.txt'})

doesn't always behave nicely with expect_failures = True.

Specifically, if the custom_rule target fails before an action is registered to output my_output, a stack trace is thrown by Bazel.

at com.google.devtools.build.lib.analysis.CachingAnalysisEnvironment.verifyGeneratedArtifactHaveActions(CachingAnalysisEnvironment.java:144)
	at com.google.devtools.build.lib.analysis.CachingAnalysisEnvironment.disable(CachingAnalysisEnvironment.java:107)
	at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.createConfiguredTarget(ConfiguredTargetFunction.java:856)
	at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.compute(ConfiguredTargetFunction.java:358)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:440)
	... 6 more
@c-parsons c-parsons self-assigned this Mar 21, 2019
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant