Skip to content

ESP32: Preload pioarduino scons - #56

Merged
vidplace7 merged 1 commit into
mainfrom
esp32-scons
Jul 27, 2026
Merged

ESP32: Preload pioarduino scons#56
vidplace7 merged 1 commit into
mainfrom
esp32-scons

Conversation

@vidplace7

@vidplace7 vidplace7 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Preload tool-scons from pioarduino. Currently this is being downloaded upon every build.

Summary by CodeRabbit

  • Bug Fixes
    • Improved PlatformIO tool installation across supported platform configurations.
    • Ensured required analysis and filesystem tools are installed consistently.
    • Preserved existing package deduplication and environment detection behavior.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@vidplace7, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c5c1785e-69ee-4a8a-98e7-641fd15a72f9

📥 Commits

Reviewing files that changed from the base of the PR and between 21d9fcc and 4f90c44.

📒 Files selected for processing (1)
  • bin/pio_load_and_dedupe.sh
📝 Walkthrough

Walkthrough

The 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.

Changes

PlatformIO tool installation

Layer / File(s) Summary
Centralized tool flags and installation
bin/pio_load_and_dedupe.sh
Defines shared cppcheck and mklittlefs flags, conditionally adds the SCons tool, and uses the aggregated flags in pio pkg install.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

I’m a rabbit with flags in a neat little row,
Tools hop in when the platforms say so.
cppcheck and mklittlefs join the parade,
SCons takes a turn when ESP32 has not stayed.
One install command, tidy and bright—
Dedupe still dances exactly right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and matches the main change of preloading pioarduino SCons for ESP32 builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
bin/pio_load_and_dedupe.sh (1)

16-19: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use a Bash array for TOOL_FLAGS

Expanding 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

📥 Commits

Reviewing files that changed from the base of the PR and between 78d6a8e and 21d9fcc.

📒 Files selected for processing (1)
  • bin/pio_load_and_dedupe.sh

Comment thread bin/pio_load_and_dedupe.sh
@vidplace7
vidplace7 merged commit 218dd4b into main Jul 27, 2026
11 checks passed
@vidplace7
vidplace7 deleted the esp32-scons branch July 27, 2026 20:39
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