ESP32: Preload pioarduino scons - #56
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PlatformIO loading script now centralizes tool installation arguments, conditionally adds the SCons local tool for non-ESP32 platforms, and passes the resulting flags to each package installation command. ChangesPlatformIO tool installation
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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
🧹 Nitpick comments (1)
bin/pio_load_and_dedupe.sh (1)
16-19: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winUse a Bash array for
TOOL_FLAGSExpanding this scalar unquoted relies on word splitting and can break if a future tool argument contains whitespace or glob characters. Store each CLI argument as an array element and invoke it with
"${TOOL_FLAGS[@]}".Proposed fix
-TOOL_FLAGS="--tool platformio/tool-cppcheck --tool platformio/tool-mklittlefs" +TOOL_FLAGS=(--tool platformio/tool-cppcheck --tool platformio/tool-mklittlefs) if [[ "$PLATFORM_SRC" != esp32* ]]; then - TOOL_FLAGS="$TOOL_FLAGS --tool https://github.com/pioarduino/scons/releases/download/4.8.1/scons-local-4.8.1.tar.gz" + TOOL_FLAGS+=(--tool https://github.com/pioarduino/scons/releases/download/4.8.1/scons-local-4.8.1.tar.gz) fi @@ - pio pkg install --environment "$env" --no-save $TOOL_FLAGS + pio pkg install --environment "$env" --no-save "${TOOL_FLAGS[@]}"Also applies to: 29-29
🤖 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 `@bin/pio_load_and_dedupe.sh` around lines 16 - 19, Update TOOL_FLAGS in the script to a Bash array with one CLI argument per element, append the conditional SCons tool as another element, and expand it as "${TOOL_FLAGS[@]}" at the invocation site instead of relying on unquoted scalar word splitting.Source: Linters/SAST tools
🤖 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 `@bin/pio_load_and_dedupe.sh`:
- Around line 16-19: Invert the condition in the TOOL_FLAGS setup so the SCons
tarball is appended when PLATFORM_SRC matches esp32*, while non-ESP32 platforms
retain only the existing tools.
---
Nitpick comments:
In `@bin/pio_load_and_dedupe.sh`:
- Around line 16-19: Update TOOL_FLAGS in the script to a Bash array with one
CLI argument per element, append the conditional SCons tool as another element,
and expand it as "${TOOL_FLAGS[@]}" at the invocation site instead of relying on
unquoted scalar word splitting.
🪄 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 Plus
Run ID: 97a6ca3e-e45c-445d-ac48-5dfa599a5f5d
📒 Files selected for processing (1)
bin/pio_load_and_dedupe.sh
Preload
tool-sconsfrom pioarduino. Currently this is being downloaded upon every build.Summary by CodeRabbit