Repository navigation
fix: Enhance Windows build process for office_oxide and rag tokenizer - #16223
Conversation
Updated MSYS2 package list for Windows builds and added Rust target specifications. Modified build steps for office_oxide and rag tokenizer libraries to improve compatibility and streamline the build process.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe release workflow's Windows build pipeline replaces the prebuilt ChangesWindows Native Build Toolchain Overhaul
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 224-228: Replace the `@stable` tag reference in the
`dtolnay/rust-toolchain` action with a specific commit SHA hash. Look up the
latest commit SHA from the dtolnay/rust-toolchain repository and pin the action
to that commit hash in the format `dtolnay/rust-toolchain@<commit-sha>` instead
of using the mutable `@stable` tag to ensure supply chain security.
- Around line 395-407: The Windows build in the release workflow checks for
librag_tokenizer_c_api.a existence but fails to link it because rag_analyzer.go
is missing a Windows-specific cgo directive. Add a `#cgo` windows directive to
rag_analyzer.go alongside the existing linux and darwin cgo directives, ensuring
it links both librag_tokenizer_c_api.a and libpcre2-8 in the same manner as the
other platform-specific directives. This will ensure the required libraries are
properly linked during Windows CLI binary compilation.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 115263f4-6527-4e63-89ee-5bca36dca6aa
📒 Files selected for processing (1)
.github/workflows/release.yml
| - name: Set up Rust for Windows office_oxide staticlib | ||
| if: runner.os == 'Windows' | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: ${{ matrix.rust_target }} |
There was a problem hiding this comment.
Pin the action to a specific commit SHA for supply chain security.
The dtolnay/rust-toolchain action is referenced by the @stable tag rather than a commit hash. Pinning to a full commit SHA prevents unexpected changes if the tag is moved and mitigates supply-chain attacks.
🔒 Proposed fix
- name: Set up Rust for Windows office_oxide staticlib
if: runner.os == 'Windows'
- uses: dtolnay/rust-toolchain@stable
+ uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable
with:
targets: ${{ matrix.rust_target }}Note: Verify the latest commit SHA from the repository before applying.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Set up Rust for Windows office_oxide staticlib | |
| if: runner.os == 'Windows' | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust_target }} | |
| - name: Set up Rust for Windows office_oxide staticlib | |
| if: runner.os == 'Windows' | |
| uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable | |
| with: | |
| targets: ${{ matrix.rust_target }} |
🧰 Tools
🪛 zizmor (1.25.2)
[error] 226-226: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release.yml around lines 224 - 228, Replace the `@stable`
tag reference in the `dtolnay/rust-toolchain` action with a specific commit SHA
hash. Look up the latest commit SHA from the dtolnay/rust-toolchain repository
and pin the action to that commit hash in the format
`dtolnay/rust-toolchain@<commit-sha>` instead of using the mutable `@stable` tag
to ensure supply chain security.
Source: Linters/SAST tools
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16223 +/- ##
==========================================
- Coverage 94.56% 93.16% -1.40%
==========================================
Files 10 10
Lines 717 717
Branches 118 118
==========================================
- Hits 678 668 -10
- Misses 25 29 +4
- Partials 14 20 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
Updated MSYS2 package list for Windows builds and added Rust target specifications. Modified build steps for office_oxide and rag tokenizer libraries to improve compatibility and streamline the build process.
Type of change