witty-crayon-22786
02/06/2020, 6:13 PMCoverageResult union for https://github.com/pantsbuild/pants/pull/8978 : what trouble did you run into?witty-crayon-22786
02/06/2020, 6:16 PMtest rules, that would still be preferable to a separate goal, i thinkhundreds-father-404
02/06/2020, 6:16 PMwitty-crayon-22786
02/06/2020, 6:24 PMdry-analyst-73584
02/06/2020, 6:24 PMCoverageResult union, but could not await Get[CoverageResult] in the generic test runner because the only way to get a CoverageResult was in the pants.backend.python backend, which is not always installed.witty-crayon-22786
02/06/2020, 6:24 PMdry-analyst-73584
02/06/2020, 6:25 PMdry-analyst-73584
02/06/2020, 6:25 PMwitty-crayon-22786
02/06/2020, 6:25 PMwitty-crayon-22786
02/06/2020, 6:25 PMwitty-crayon-22786
02/06/2020, 6:26 PMdry-analyst-73584
02/06/2020, 6:27 PMawait Get inside a check for whether the --run-coverage option was passed, but the build graph sees that it requests a CoverageResult and fails.witty-crayon-22786
02/06/2020, 6:28 PMwitty-crayon-22786
02/06/2020, 6:28 PMwitty-crayon-22786
02/06/2020, 6:29 PMwitty-crayon-22786
02/06/2020, 6:29 PMwitty-crayon-22786
02/06/2020, 6:30 PMwitty-crayon-22786
02/06/2020, 6:30 PMhundreds-father-404
02/06/2020, 6:30 PMPythonCoverageResultOriginally, we did do this. But the issue is that we must provide a no-op way to
await Get[PythonCoverageResult] when pants.backend.python is not registered. If we provide a no-op, then the rule graph would always use that rule because it’s the simplest path, rather than having to call the Python ruleswitty-crayon-22786
02/06/2020, 6:31 PMhundreds-father-404
02/06/2020, 6:31 PMv2-coverage or pytest-cov2witty-crayon-22786
02/06/2020, 6:32 PMhundreds-father-404
02/06/2020, 6:32 PM(as an Optional field on the TestResult, for example)We already have that for an individual
TestResult. But we need some way to collect and merge all the `TestResult.coverage_digest`s into one single CoverageResport. So, we would have to create a new type. This is where we ran into the issues with needing a no-op implementationwitty-crayon-22786
02/06/2020, 6:34 PMwitty-crayon-22786
02/06/2020, 6:36 PMyield Get[X]($union) "disappears" from the graph... there is no validation, effectivelywitty-crayon-22786
02/06/2020, 6:36 PMwitty-crayon-22786
02/06/2020, 6:37 PMwitty-crayon-22786
02/06/2020, 6:37 PMdry-analyst-73584
02/06/2020, 6:39 PMwitty-crayon-22786
02/06/2020, 6:42 PMwitty-crayon-22786
02/06/2020, 6:42 PMdry-analyst-73584
02/06/2020, 6:44 PMdry-analyst-73584
02/06/2020, 6:45 PMaloof-angle-91616
02/06/2020, 6:49 PM