Conversation
📝 WalkthroughWalkthroughAdded EnableDelayedExpansion and a Windows batch-script loop that iterates every subfolder under Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-windows-executable-app.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-openms
- GitHub Check: build-full-app
- GitHub Check: build-simple-app
| echo 'REM Add each subfolder in share\OpenMS\THIRDPARTY to PATH' >> ${{ env.APP_NAME }}.bat | ||
| echo 'for /D %%D in ("%OPENMS_DATA_PATH%\THIRDPARTY\*") do (' >> ${{ env.APP_NAME }}.bat | ||
| echo ' set "PATH=!PATH!;%%D"' >> ${{ env.APP_NAME }}.bat | ||
| echo ')' >> ${{ env.APP_NAME }}.bat | ||
| echo '' >> ${{ env.APP_NAME }}.bat |
There was a problem hiding this comment.
Critical: Delayed expansion not enabled for PATH variable update.
Line 266 uses the !PATH! syntax which requires delayed expansion to be enabled in the batch file. Without setlocal enabledelayedexpansion at the beginning of the batch file, !PATH! will be treated as a literal string rather than expanding the PATH variable, breaking the intended functionality.
Additionally, verify that the share\OpenMS\THIRDPARTY directory structure with subdirectories actually exists in the packaged files, as the build process (lines 108-124) flattens the THIRDPARTY structure during the build.
🔎 Proposed fix for delayed expansion
echo '@echo off' > ${{ env.APP_NAME }}.bat
+echo 'setlocal enabledelayedexpansion' >> ${{ env.APP_NAME }}.bat
echo '' >> ${{ env.APP_NAME }}.bat
echo 'REM Set OpenMS data path for TOPP tools' >> ${{ env.APP_NAME }}.bat
echo 'set OPENMS_DATA_PATH=%~dp0share\OpenMS' >> ${{ env.APP_NAME }}.batRun the following script to verify the THIRDPARTY directory structure in the packaging process:
#!/bin/bash
# Description: Verify if THIRDPARTY subdirectories are preserved in the package
# Expected: Find evidence that THIRDPARTY structure is maintained in share/OpenMS
# Check packaging configuration
rg -n "THIRDPARTY" --type yaml -C3
# Look for any CMake or packaging scripts that handle THIRDPARTY
fd -e cmake -e txt | xargs rg -l "THIRDPARTY" | head -10
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.