Skip to content

make ampworks env build from a fresh clone (portable ArduinoLibs path) - #5

Merged
aphelps-claude-bot merged 4 commits into
mainfrom
portable-lib-paths
Jul 16, 2026
Merged

aphelps-claude-bot merged 4 commits into
mainfrom
portable-lib-paths

Conversation

@aphelps-claude-bot

Copy link
Copy Markdown
Collaborator

Part of the parent WLED_dev setup-portable-build PR (one-command clone to build).

Makes the ampworks env build on any machine from a fresh clone:

  • Portable lib path: replace the hardcoded /Users/amp/Dropbox/Arduino/ArduinoLibs
    in lib_extra_dirs/lib_deps with ${PROJECT_DIR}/../ArduinoLibs, resolving MPR121
    and Debug by name from the ArduinoLibs submodule vendored in the parent WLED_dev repo.
  • Self-sufficient config: the env overrode extra_scripts and dropped the default
    user_config_copy.py, so a fresh clone failed with fatal error: my_config.h (because
    [common] sets -DWLED_USE_MY_CONFIG). Re-add user_config_copy.py as a pre-script.

Test plan

  • pio run -e ampworks builds clean, resolving MPR121/Debug from the vendored path (no /Users/ paths).
  • pio run -e esp32dev still builds.
  • Verified end-to-end via a fresh clone of the parent repo + ./setup.sh (build SUCCESS, firmware.bin produced).

Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]

aphelps-claude-bot and others added 2 commits July 13, 2026 22:40
Replace the hardcoded /Users/amp/Dropbox/Arduino/ArduinoLibs absolute
lib_extra_dirs/lib_deps in [env:ampworks] with ${PROJECT_DIR}/../ArduinoLibs,
resolving the MPR121 and Debug libraries by name from the ArduinoLibs
submodule vendored in the parent WLED_dev repo. Makes the build
machine-independent (no personal absolute path), so a fresh clone builds
without editing platformio.ini.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The ampworks env overrides extra_scripts, which dropped the default
pio-scripts/user_config_copy.py — so a fresh clone (no wled00/my_config.h)
failed with "fatal error: my_config.h: No such file or directory" because
[common] build_flags sets -DWLED_USE_MY_CONFIG. Re-add user_config_copy.py as a
pre-script so the env creates my_config.h from the sample on its own.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A bare `MPR121` / `Debug` in lib_deps lets PlatformIO fall back to the online
registry and silently install a DIFFERENT MPR121 (e.g. janelia-arduino/MPR121)
when the vendored ../ArduinoLibs path is absent — as in the WLED fork's
standalone CI, where it then fails with "class MPR121 has no member 'triggered'".
Use explicit ${PROJECT_DIR}/../ArduinoLibs/MPR121 (+ /Debug) paths so resolution
is unambiguous and a missing submodule fails hard instead of grabbing the wrong lib.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

@aphelps-claude-bot aphelps-claude-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

CI note (needs a decision). The ampworks build fails in this fork's standalone CI, and it's structural, not a flake:

  • ampworks depends on ArduinoLibs, which is vendored in the parent WLED_dev repo (${PROJECT_DIR}/../ArduinoLibs), not in this fork. In standalone CI that path doesn't exist.
  • CI originally masked this by falling back to the registry and installing a different MPR121 (janelia-arduino/MPR121) → class MPR121 has no member 'triggered'. Just fixed by switching to explicit paths (no registry fallback) — so it now fails honestly when ArduinoLibs is absent.
  • ampworks was already red on main before this PR (the old absolute /Users/... path also doesn't exist on a runner).

esp32dev builds green. Options to get this PR's CI green:

  1. Drop ampworks from default_envs in platformio.ini (→ esp32dev only). ampworks is validated via the WLED_dev super-repo + setup.sh (verified: fresh clone → build SUCCESS). (recommended — 1 line, keeps the option-b vendoring)
  2. Add CI to WLED_dev that runs setup.sh and builds ampworks where ArduinoLibs exists.
  3. Reconsider vendoring ArduinoLibs inside this fork instead (option a).

Which would you like?

The ampworks env depends on ArduinoLibs vendored in the parent WLED_dev repo
(${PROJECT_DIR}/../ArduinoLibs), so a standalone WLED checkout — including this
fork's CI (plain checkout, no submodules) — cannot build it. default_envs drives
both the bare `pio run` default and the CI matrix, so listing ampworks there
advertised an env the repo can't build alone (CI was already red on main for it).

Build ampworks explicitly with `pio run -e ampworks` from the WLED_dev super-repo
(setup.sh and the upload commands already do). CI now builds esp32dev; ampworks
integration is validated at the super-repo level via setup.sh.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

@aphelps-claude-bot aphelps-claude-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done — dropped ampworks from default_envs in platformio.ini (WLED 93984e28), so the fork's CI matrix is now esp32dev only. Rationale: ampworks depends on ArduinoLibs vendored in the parent WLED_dev repo, so a standalone WLED checkout (including this CI, which does a plain non-recursive checkout) structurally can't build it — it was already red on main for the same reason. Build it explicitly with pio run -e ampworks from the super-repo (setup.sh does this). Filed a follow-up to add real ampworks/apa102_mpr121 CI coverage at the WLED_dev super-repo level (where ArduinoLibs exists). esp32dev stays green.

@aphelps aphelps left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Change still looks good

@aphelps-claude-bot
aphelps-claude-bot merged commit 4eb8fed into main Jul 16, 2026
6 checks passed
@aphelps-claude-bot
aphelps-claude-bot deleted the portable-lib-paths branch July 16, 2026 03:45
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.

2 participants