Update dependency score_toolchains_rust to v0.10.0 - #369
Update dependency score_toolchains_rust to v0.10.0#369eclipse-score-bot wants to merge 4 commits into
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
|
Hi @pawelrutkaq, could you take a look at what is the problem updating the rust toolchain? and |
9dde20d to
bd2a4ef
Compare
@pawelrutkaq @NicolasFussberger TL;DR: score_toolchains_rust 0.9.2 enables real coverage instrumentation for Rust code. Instrumented Rust compiles need the profiler_builtins crate from the sysroot — but because this repo registers the Miri toolchain in the base platform config, the S-CORE rules_rust fork points all Rust compiles at the Miri sysroot, which does not ship profiler_builtins. Result: E0463 at compile time. Reproduced and diagnosed locally; workaround and root fixes below. The failure ERROR: .../score_baselibs+/src/log/score_log_fmt/BUILD:15:13: Compiling Rust rlib score_log_fmt (8 files) failed Why a C++ coverage job compiles Rust at all The job runs bazel coverage ... --test_lang_filters=-rust,-miri -- //score/.... The filter only controls which tests execute — //score/... still builds every target in the tree, including this repo's Rust libraries (//score/health_monitor/src/rust:health_monitoring_lib, //score/launch_manager/src/alive/src/rust:alive_rs, //score/launch_manager/src/lifecycle_client/src/rust:lifecycle_client_rs) and their score_baselibs Rust dependencies — which is where the compile fails. The build abort is why unrelated C++ tests show NO STATUS. The causal chain (three interacting pieces)
Evidence (local repro with the exact CI invocation) The failing rustc command mixes the regular toolchain with the Miri sysroot: .../ferrocene_x86_64_unknown_linux_gnu/rust_ferrocene/bin/rustc and that sysroot contains libstd-.rlib but no libprofiler_builtins-.rlib (the main toolchain tarballs got the profiler runtime in the ferrocene_toolchain_builder "prof" rebuild in June; the miri-sysroot tarballs never did). Repos that register Miri only inside dedicated configs (e.g. communication, persistency coverage setups) are unaffected — no sysroot override in their coverage builds. Workaround to unblock this PR (repo-side, small) Move the Miri toolchain registration out of the base platform configs into a dedicated config used only by Miri invocations: .bazelrc — remove from build:x86_64-linux / build:arm64-linux:--extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu_miri--extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_linux_gnu_miri(and invoke Miri tests with --config=miri). Beyond fixing this failure, it restores a healthy invariant: coverage (native instrumentation) and Miri (MIR interpretation for UB detection) are contradictory build modes and should never share a configuration. Root fixes (tracked separately — either makes the workaround unnecessary)
|
bd2a4ef to
9da326d
Compare
9da326d to
f3fe441
Compare
* cpp-coverage: pass --build_tests_only to bazel coverage Test language/tag filters only control which tests RUN - with wildcard target patterns, bazel coverage still BUILDS filtered-out test targets. This broke consumers with Miri tests once score_toolchains_rust 0.9.2 enabled Rust coverage instrumentation: the Miri test subgraph is compiled against the Miri sysroot, which does not ship the profiler_builtins crate that instrumented compiles require (error[E0463], aborting the whole coverage invocation and killing in-flight C++ tests). With --build_tests_only the filters apply to building as well, so excluded tests are neither run nor built. Verified on eclipse-score/lifecycle#369: without the flag the job fails at 16/19 tests; with it, exit 0 and 19/19 tests pass. Fixes #164 * rust-coverage: pass --build_tests_only to bazel test Same hardening as cpp-coverage (see #164): make consumers' --test_lang_filters/--test_tag_filters apply to building as well, so filtered-out tests (e.g. Miri targets, whose Miri-sysroot compiles fail under coverage instrumentation) are neither run nor built. Consumers that already pass --build_tag_filters (e.g. lifecycle's rust job with -miri,-loom) are unaffected; this protects the ones relying on test filters alone. Refs #164
score_toolchains_rust 0.9.2 enables Rust coverage instrumentation, which exposed that the coverage workflows built filtered-out Miri test targets - their Miri-sysroot compiles fail with error[E0463]: can't find crate for 'profiler_builtins', aborting the whole C++ Coverage job. eclipse-score/cicd-workflows#164 (fixed in #165, commit 4c20f0d9) adds --build_tests_only so test filters apply to building as well. Bump the cpp-coverage/rust-coverage refs to pick it up. Verified locally on this branch's toolchain bump: without the fix the coverage run aborts at 16/19 tests; with it, 19/19 tests pass.
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
#35) 1.3.0 mixed artifacts from two different builds: the coverage-tools tarball was freshly rebuilt (ubuntu20-prof tree) while the main toolchain tarballs were carried over (ubuntu24-prof tree). The dynamically linked Rust tools (symbol-report/blanket) require the exact libstd of the build that produced them, so every consumer of the default toolchains failed the blanket coverage flow with 'symbol lookup error: undefined symbol: ..._3std...Mutex4wake' (seen on eclipse-score/lifecycle#369 and eclipse-score/baselibs#412). 1.3.1 rebuilds ALL artifacts from a single tree: - symbol-report/blanket ABI-match the shipped libstd again (verified: both carry std build Csi8ZjCaVeSd1) - miri-sysroots now include libprofiler_builtins, so coverage- instrumented compiles against the Miri sysroot no longer fail with E0463 (root fix; the --build_tests_only mitigation in cicd-workflows remains as defense in depth) - QNX toolchains are built with the profiler runtime for the first time - coverage-tools keep llvm-cov/llvm-profdata/llvm-cxxfilt (the 1.3.0 feature enabling Rust coverage instrumentation) Validated against lifecycle with a local override: rust tests green under ferrocene-coverage, blanket report generated (94.25% line coverage), llvm tools and miri profiler_builtins present.
v0.10.0 pins ferrocene_toolchain_builder 1.3.1, which rebuilds all toolchain artifacts from a single build tree. This fixes the rust-coverage failure on this PR: the 1.3.0 coverage-tools shipped a symbol-report/blanket build that was ABI-incompatible with the main toolchain's libstd (symbol lookup error, exit 127 in the blanket report step). Validated locally against registry v0.10.0: rust tests green under ferrocene-coverage and the blanket report generates successfully (94.25% line coverage).
This PR contains the following updates:
0.9.1→0.9.2Release Notes
eclipse-score/toolchains_rust (score_toolchains_rust)
v0.9.2What's Changed
Full Changelog: eclipse-score/toolchains_rust@v0.9.1...v0.9.2
This PR was generated by #infrastructure automation. Contact us if you have any questions or feedback.