Skip to content

Conversation

@avagin
Copy link
Collaborator

@avagin avagin commented Oct 29, 2025

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

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

Signed-off-by: AV <avagin@gmail.com>
copybara-service bot pushed a commit that referenced this pull request Oct 29, 2025
 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: 825669734
copybara-service bot pushed a commit that referenced this pull request Oct 29, 2025
 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: 825700145
copybara-service bot pushed a commit that referenced this pull request Oct 29, 2025
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: 825700145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant