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
Remove unit out dir before building the unit - #41
Builds using the unstable new build-directory layout now recreate unit output directories before compilation.
When rebuilding a library with this layout, hard-linked backup files retain their original contents, while newly generated files reflect the updated source. This helps prevent existing backups from being unintentionally changed during a rebuild.
ranger-ross
changed the title
Added test for overwriting hardlinked files
Remove unit out dir before building the unit
Oct 28, 2026
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 76254cc3-a2e1-43ac-ad82-2d3d296c038e
Commits
Reviewing files that changed from the base of the PR and between 009c819 and 70f2154.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The compiler now uses the unstable build_dir_new_layout setting to control output-directory setup and pre-compilation cleanup. A build test checks that hard-linked .rlib, .rmeta, and .d backups retain their contents after a rebuild. A freshness test changes how the linker stub handles output-file removal errors.
Changes: Build-directory layout
Layer / File(s)
Summary
Output-directory handling and regression coverage src/compiler/mod.rs, tests/testsuite/build.rs, tests/testsuite/freshness.rs
When the new layout is enabled, the compiler removes and recreates the output directory and skips the existing pre-compilation cleanup. The build test checks that hard-linked .rlib, .rmeta, and .d backups retain their original contents after rebuilding. The freshness test ignores errors when removing the output file.
No actionable merge-blocking issue was identified. The linker fixture still creates its output before interruption, and regression coverage checks that rebuilding preserves hard-linked backups. Mergeable subject to normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title accurately identifies the main change: removing the unit output directory before building under the new layout.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 8f08c26e-a7a0-45c7-a929-a26a7a55ed21
Commits
Reviewing files that changed from the base of the PR and between 0217ae0 and 009c819.
Files selected for processing: 1
tests/testsuite/freshness.rs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This commit wipes the unit's out dir before we [re]build it to avoid
write to hardlinked files being used outside of build-dir.
The motivation for this commit is to prepare for deduplication for files
in the build-dir using shared content addressible storage. We want to
avoid overwriting a file that is hardlinked into the CAS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit