facebook / buck2

Build system, successor to Buck
https://buck2.build/
Apache License 2.0
3.49k stars 214 forks source link

Code Coverage support in Buck2 #412

Open satyajeet104 opened 11 months ago

satyajeet104 commented 11 months ago

Hi Buck2 Team,

At my organisation we're looking to integrate code coverage in Buck2, I see we already have this issue. It seems there are 2 possible approaches to provide code coverage support in Buck2:

  1. Create a new buck2 coverage command similar to bazel.
  2. Enhance the OSS test runner to support the coverage usecase.

I'd like to contribute to this effort, just wanted to know your thoughts on what approach you would prefer for this task and if anyone is already actively working on this.

Thanks, Satyajeet

ndmitchell commented 11 months ago

The way we do this internally is with the test runner, but we eventually plan to adjust the TestInfo so that it describes the coverage information. Let me ping our test folks on this issue.

satyajeet104 commented 11 months ago

Hi @ndmitchell just following up on this issue, did you get a chance to discuss this with the test folks?

stepancheg commented 10 months ago

@satyajeet104 internally we have understanding how to do it: new TestInfo will describe tests (i.e. rule implementations will describe how to run tests rather than test runner). It is likely we unify internal test runner with open source test runner: test runner will be a part of buck2 itself rather than a separate program.

This is a relatively large project. We are considering it in our planning, plans are not finalized yet.

ndmitchell commented 9 months ago

@satyajeet104 - unfortunately I couldn't get anyone to bite - as @stepancheg says, a new TestInfo is the right approach in the end.

jab commented 4 months ago

@ndmitchell @stepancheg et al., has there been any renewed interest in this internally since the last time you checked, by any chance? (Context: I'm responsible for setting modern SDLC standards at a new job and would love to consider buck2. Out-of-the-box coverage support would be a requirement.)