Skip to content

[build] bump rules_rs to 0.0.108 - #17997

Merged
titusfortner merged 2 commits into
SeleniumHQ:trunkfrom
titusfortner:rules_rs_bump
Sep 7, 2026
Merged

[build] bump rules_rs to 0.0.108#17997
titusfortner merged 2 commits into
SeleniumHQ:trunkfrom
titusfortner:rules_rs_bump

Conversation

@titusfortner

Copy link
Copy Markdown
Member

🔗 Related Issues

Supersedes #17929 with bump to later version to fix one bug and a patch to fix the other
Builds toward #17586

💥 What does this PR do?

  • Bumps rules_rs to 0.0.108, with llvm 0.8.18 and rules_cc 0.2.22 to match the resolved graph

🔧 Implementation Notes

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code (Fable 5.1)
    • What was generated: the MODULE.bazel changes, the CI log analysis, and this description
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (build dependency update; no user-facing behavior change)

@selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Sep 7, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Bump rules_rs to 0.0.108 and preserve hermetic Rust builds

⚙️ Configuration changes 🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Bumps rules_rs to 0.0.108 and aligns LLVM and rules_cc versions.
• Applies an upstream debug-prefix fix for hermetic GCC assembly builds.
• Registers all generated Rust toolchains and removes the obsolete zlib patch.
Diagram

graph TD
  module["Bazel module"] -->|pins| rs["rules_rs 0.0.108"] -->|provides| ext["Rust extensions"] -->|generates| tc["Rust toolchains"]
  module -->|aligns| llvm["LLVM 0.8.18"]
  module -->|aligns| cc["rules_cc 0.2.22"]
  patch["Debug-prefix patch"] -->|applies to| ext
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Wait for the upstream rules_rust fix
  • ➕ Avoids maintaining a temporary downstream patch.
  • ➕ Uses an officially released implementation of the debug-prefix correction.
  • ➖ Delays the rules_rs upgrade and its bundled bug fixes.
  • ➖ Leaves affected GCC assembly builds failing hermeticity checks until release.

Recommendation: Proceed with the dependency bump and narrowly scoped extension patch. It adopts the rules_rs release containing the zlib fix immediately, while carrying the pending upstream debug-prefix correction in an isolated file that can be removed once hermeticbuild/rules_rust#54 is released.

Files changed (2) +28 / -13

Bug fix (1) +17 / -0
rules_rust_debug_prefix_map.patchPreserve hermetic debug paths in GCC assembly output +17/-0

Preserve hermetic debug paths in GCC assembly output

• Patches Cargo build-script C and C++ flags to include '-fdebug-prefix-map' alongside '-ffile-prefix-map'. This ensures GCC 12 and earlier forward path remapping to the assembler, preventing absolute 'DW_AT_comp_dir' values in '.S' debug information.

third_party/bazel/rules_rust_debug_prefix_map.patch

Other (1) +11 / -13
MODULE.bazelAlign Rust build dependencies and toolchain configuration +11/-13

Align Rust build dependencies and toolchain configuration

• Bumps rules_rs to 0.0.108, LLVM to 0.8.18, and rules_cc to 0.2.22 while removing the obsolete zlib snapshot override. Applies the debug-prefix patch through the rules_rust extension and registers toolchains with '//...' because the new release no longer generates a root package.

MODULE.bazel

@qodo-code-review

qodo-code-review Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. A dependency refresh can erase the fix 📘 Rule violation ⚙ Maintainability
Description
rules_rust_debug_prefix_map.patch is added directly beneath the protected third_party/ area.
When that area is refreshed or replaced, the locally maintained Rust compiler fix can be overwritten
and its use from MODULE.bazel can become inconsistent.
Code

third_party/bazel/rules_rust_debug_prefix_map.patch[1]

+diff --git a/cargo/private/cargo_build_script.bzl b/cargo/private/cargo_build_script.bzl
Evidence
Compliance rule 3 prohibits direct modifications under third_party/. The cited file is newly added
by this PR at third_party/bazel/rules_rust_debug_prefix_map.patch, directly violating that path
restriction.

AGENTS.md: Do Not Modify Read-Only or Generated Repository Areas
third_party/bazel/rules_rust_debug_prefix_map.patch[1-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Rust dependency patch is stored directly under the protected `third_party/` repository area.

## Issue Context
Move the patch to a repository-owned, non-generated location and update the module override to use its new label without changing the patch behavior.

## Fix Focus Areas
- third_party/bazel/rules_rust_debug_prefix_map.patch[1-17]
- MODULE.bazel[389-391]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Web pages:
  +4 more
Review mode: ⚖️ Balanced: This build dependency and toolchain update changes Bazel module resolution, toolchain registration, and applies a compiler-flag patch, creating meaningful build and hermeticity risk but not enough independent logic for extended review.

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread third_party/bazel/rules_rust_debug_prefix_map.patch
@qodo-code-review

qodo-code-review Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

No code changes since the last review — review skipped

Qodo Logo

@titusfortner
titusfortner merged commit 1303bd5 into SeleniumHQ:trunk Sep 7, 2026
56 of 58 checks passed
AutomatedTester added a commit that referenced this pull request Sep 8, 2026
Follow-on to #17997 (0.0.108/0.8.18). Bumps rules_rs (which vendors
rules_rust) and @llvm (LLVM 23.1.0). Trunk's rules_rust
debug-prefix-map patch still applies against 0.0.109's vendored
rules_rust. Validated with a clean //rust:selenium-manager build on
macOS.
AutomatedTester added a commit that referenced this pull request Sep 9, 2026
Follow-on to #17997 (0.0.108/0.8.18). Bumps rules_rs (which vendors
rules_rust) and @llvm (LLVM 23.1.0). Trunk's rules_rust
debug-prefix-map patch still applies against 0.0.109's vendored
rules_rust. Validated with a clean //rust:selenium-manager build on
macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants