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).
…pse-score#212) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [score_toolchains_rust](https://redirect.github.com/eclipse-score/toolchains_rust) | bazel_dep | minor | `0.9.2` → `0.10.0` | --- ### Release Notes <details> <summary>eclipse-score/toolchains_rust (score_toolchains_rust)</summary> ### [`v0.10.0`](https://redirect.github.com/eclipse-score/toolchains_rust/releases/tag/v0.10.0): Ferrocene artifacts updated to ferrocene_toolchain_builder 1.3.1 All artifact pins (toolchain tarballs for all four target triples, Miri sysroots, coverage-tools) now point to builder release 1.3.1, which rebuilds all artifacts from a single build tree. This fixes two issues introduced by the mixed-build 1.3.0 artifacts referenced in 0.9.2: - Fixed: symbol-report/blanket crashed at startup (symbol lookup error: undefined symbol: ...\_3std...Mutex4wake, exit 127), breaking the Ferrocene rust-coverage flow for all consumers of the default toolchains (seen on [eclipse-score/lifecycle#369](https://redirect.github.com/eclipse-score/lifecycle/issues/369), [eclipse-score/baselibs#412](https://redirect.github.com/eclipse-score/baselibs/issues/412)). The coverage tools are now ABI-consistent with the shipped libstd. - Fixed: Miri sysroots now include libprofiler\_builtins, so crates compiled against the Miri sysroot no longer fail with error\[E0463]: can't find crate for 'profiler\_builtins' when coverage instrumentation is enabled (e.g. Miri test targets built during bazel coverage runs). Additionally: - QNX toolchains are built with the profiler runtime for the first time, laying the groundwork for Rust coverage on QNX targets (includes two compiler-rt portability patches applied in the builder). - coverage-tools continue to ship llvm-cov/llvm-profdata/llvm-cxxfilt built from the same LLVM as rustc (the 0.9.2 feature enabling Rust coverage instrumentation via rules\_rust). New: examples with CI smoke tests ([#​36](https://redirect.github.com/eclipse-score/toolchains_rust/issues/36), fixes [#​21](https://redirect.github.com/eclipse-score/toolchains_rust/issues/21)) examples/basic/ demonstrates toolchain consumptione way downstream repositories use it) and runs as asmoke test on every PR: build, test, and a coverage run asserting that real LCOV data is produced. Artifact regressions of the kind fixed above are now caught in this repository's CI Upgrade notes - No MODULE.bazel changes are required in consuminsion and refresh your lockfile (bazel mod deps--lockfile\_mode=update). - All toolchain binaries change with this release ect a full Rust rebuild on first use. - Reminder from 0.9.2: under bazel coverage, Rust targets are instrumented (-Cinstrument-coverage) because the toolchains declare llvm\_cov/llvm\_profdata. Coverage jobs using wildcald\_tests\_only so test filters also apply to building (already fixed fleet-wide in [eclipse-score/cicd-workflows#164](https://redirect.github.com/eclipse-score/cicd-workflows/issues/164)/[#​165](https://redirect.github.com/eclipse-score/toolchains_rust/issues/165)). </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [#infrastructure](https://redirect.github.com/orgs/eclipse-score/discussions/107) automation. Contact us if you have any questions or feedback. <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC40LjYiLCJ1cGRhdGVkSW5WZXIiOiI0NC40LjYiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImF1dG9tYXRpb24iLCJyZW5vdmF0ZSJdfQ==-->
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.