Skip to content

fix: ring recompilation#1252

Merged
JesseTheRobot merged 2 commits into
masterfrom
fix/ring-recompilation
Mar 26, 2026
Merged

fix: ring recompilation#1252
JesseTheRobot merged 2 commits into
masterfrom
fix/ring-recompilation

Conversation

@JesseTheRobot

@JesseTheRobot JesseTheRobot commented Mar 26, 2026

Copy link
Copy Markdown
Member

Describe the changes
This fixes ring recompilation caused by nested cargo env var inheritance when the multiversion test harness runs cargo build.

Summary by CodeRabbit

  • Bug Fixes
    • Improved build isolation by preventing unintended environment variable interference during multiversion testing.

@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The multiversion test runner now constructs a mutable Command for cargo and strips several environment variables (cargo package metadata, pregenerated asm flag, and certain target configs) from the child process before spawning the build.

Changes

Cohort / File(s) Summary
Environment variable stripping for cargo build
crates/tooling/multiversion-tests/src/binary.rs
Build invocation changed to create a mutable Command, call cmd.env_remove(...) for CARGO_MANIFEST_DIR, CARGO_PKG_*, CARGO_MANIFEST_LINKS, RING_PREGENERATE_ASM, and selected CARGO_CFG_TARGET_* vars, then spawn() the child. Remaining stderr piping, timeout, kill/reap, and error handling unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'fix: ring recompilation' directly addresses the main change: removing environment variables that cause ring recompilation during cargo builds.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ring-recompilation

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/tooling/multiversion-tests/src/binary.rs`:
- Around line 377-409: Add a TODO above the env var list loop in
multiversion-tests::binary (around the Command::new("cargo") / for var in [...]
block) noting that this is a temporary workaround tied to ring's behavior and
include the ring crate version (and optionally a link or issue reference) so we
can remove the workaround when upstream fixes it; mirror the version-tracking
TODO comment style used in xtask's remove_and_run to make future cleanup
straightforward.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8c67c906-fadc-4c89-9a1c-888a7f58fcdb

📥 Commits

Reviewing files that changed from the base of the PR and between 46f6611 and 1ebf02a.

📒 Files selected for processing (1)
  • crates/tooling/multiversion-tests/src/binary.rs

Comment thread crates/tooling/multiversion-tests/src/binary.rs
@github-actions

Copy link
Copy Markdown
Contributor

@JesseTheRobot JesseTheRobot merged commit 20b3171 into master Mar 26, 2026
17 of 18 checks passed
@JesseTheRobot JesseTheRobot deleted the fix/ring-recompilation branch March 26, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant