mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
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: https://github.com/golang/go/issues/51430 PiperOrigin-RevId: 828145693
22 lines
411 B
Python
22 lines
411 B
Python
load("//tools:defs.bzl", "go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "coverage",
|
|
srcs = [
|
|
"coverage.go",
|
|
"coverage_unsafe.go",
|
|
],
|
|
visibility = ["//:sandbox"],
|
|
deps = [
|
|
"//pkg/hostarch",
|
|
"//pkg/log",
|
|
"//pkg/sync",
|
|
"@io_bazel_rules_go//go/tools/coverdata",
|
|
],
|
|
)
|