You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cpp-coverage: bazel coverage builds filtered-out test targets (breaks consumers with Miri/Rust tests) #164
cpp-coverage.yml runs bazel coverage [flags] -- <targets> without --build_tests_only. Consumers typically pass --test_lang_filters=-rust,-miri via extra-bazel-flags, but test language filters only control which tests run — not what gets built. With wildcard targets (//score/...), Bazel still builds every test target, including filtered-out ones.
error[E0463]: can't find crate for `profiler_builtins`
Chain: the job builds lifecycle's Miri test targets (execution filtered, build not) → the rules_rust fork's Miri support compiles their dependency subgraph against the Miri sysroot → since score_toolchains_rust 0.9.2, bazel coverage instruments Rust compiles (--codegen=instrument-coverage), which requires the profiler_builtins crate from the sysroot → the Miri sysroot artifact ships without the profiler runtime → compile error aborts the whole invocation, killing the in-flight C++ tests (NO STATUS).
Fix
Add --build_tests_only to the bazel coverage invocation in cpp-coverage.yml. With it, test filters apply to building as well, so filtered-out (Rust/Miri) tests are neither run nor built. This matches how the communication and persistency coverage setups invoke bazel coverage, and it is semantically right for a coverage job: only test targets and their dependencies matter for coverage.
Verified locally on lifecycle with the 0.9.2 bump: without the flag → E0463 build abort (16/19 tests, job red); with the flag → exit 0, 19/19 tests pass.
Related follow-ups (tracked elsewhere)
ferrocene_toolchain_builder: ship libprofiler_builtins in the miri-sysroot tarballs
rules_rust fork: suppress -Cinstrument-coverage for miri_enabled compiles (instrumenting interpreted-mode builds is meaningless)
Activity
coverage fix (eclipse-score#165)
ci: bump coverage workflow refs for --build_tests_only fix
chore(deps): update dependency score_toolchains_rust to v0.10.0 (ecli…