bazel: BEP's named set of files is incomplete if an action from any output group of a set of groups fails

Let T be a target, foo-outputs and bar-outputs be output groups, foo-action and bar-action be actions in T, and foo.out and bar.out be outputs generated by foo-action and bar-action respectively.

  • If we build T and request for foo-outputs, we expect foo.out to be in a NamedSetOfFiles in the BEP output. This is WAI.
  • If we build T and request for foo-outputs and bar-outputs, we expect foo.out and bar.out to be in in their own NamedSetOfFiles, since they were generated by different actions foo-action and bar-action. This is WAI.
  • If we build T and request for foo-outputs and bar-outputs, and bar-action fails, we expect that foo.out to still be listed in BEP. However, this is not the case and foo.out is missing, even with --keep_going.
  • Additionally, if there is a target U that depends on T, U’s foo-outputs files will also be missing from the BEP.

This has caused issues with IJwB’s Java integration. See this issue for the diagnosis and a repro project. https://github.com/bazelbuild/intellij/issues/1167#issuecomment-533693212

The intuitive BEP state here is that the foo-outputs files should still be listed, regardless of failing actions requested by other output groups.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry for the delay with fixing this particular issue.

The first attempt at a fix was known to misreport some action outputs when building with --nokeep_going. My latest attempt addresses that concern. The new approach also handles the case where some (but not all) actions fail while producing outputs for the same output_group.