Repository navigation
make ampworks env build from a fresh clone (portable ArduinoLibs path) - #5
Conversation
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
left a comment
There was a problem hiding this comment.
CI note (needs a decision). The ampworks build fails in this fork's standalone CI, and it's structural, not a flake:
ampworksdepends onArduinoLibs, which is vendored in the parentWLED_devrepo (${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. ampworkswas already red onmainbefore 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:
- Drop
ampworksfromdefault_envsinplatformio.ini(→esp32devonly).ampworksis validated via theWLED_devsuper-repo +setup.sh(verified: fresh clone → build SUCCESS). (recommended — 1 line, keeps the option-b vendoring) - Add CI to
WLED_devthat runssetup.shand buildsampworkswhere ArduinoLibs exists. - 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
left a comment
There was a problem hiding this comment.
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.
Part of the parent WLED_dev
setup-portable-buildPR (one-command clone to build).Makes the
ampworksenv build on any machine from a fresh clone:/Users/amp/Dropbox/Arduino/ArduinoLibsin
lib_extra_dirs/lib_depswith${PROJECT_DIR}/../ArduinoLibs, resolvingMPR121and
Debugby name from theArduinoLibssubmodule vendored in the parent WLED_dev repo.extra_scriptsand dropped the defaultuser_config_copy.py, so a fresh clone failed withfatal error: my_config.h(because[common]sets-DWLED_USE_MY_CONFIG). Re-adduser_config_copy.pyas a pre-script.Test plan
pio run -e ampworksbuilds clean, resolving MPR121/Debug from the vendored path (no/Users/paths).pio run -e esp32devstill builds../setup.sh(build SUCCESS, firmware.bin produced).Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]