Commit d70d18c
pkg/coverage: adopt new coverage interface for kcov
This change updates the kcov implementation to use the new Go coverage interface provided by the `internal/coverage` package. The previous implementation relied on `coverdata.Blocks`, which is part of the older coverage tooling.
The new implementation uses `runtime/coverage.WriteCounters` to get the raw coverage data and then decodes it using `decodecounter.NewDecoder`. This approach is aligned with the modern Go coverage infrastructure.
This change requires a patched Go compiler that allows importing internal packages. This is a temporary measure until the golang team provides a public API.
More details can be found here: golang/go#51430
FUTURE_COPYBARA_INTEGRATE_REVIEW=#12256 from avagin:kcov-v2-main 33081ed
PiperOrigin-RevId: 8256697341 parent 9095071 commit d70d18c
2 files changed
+198
-116
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments