Conversation
c4fe0c4 to
7e4f80f
Compare
| COPY --from=dart-build --chown=$USER:$USER $DART_SDK $DART_SDK | ||
|
|
||
| # PlatformIO | ||
| RUN pip install --no-cache-dir -U platformio=="$PLATFORMIO_VERSION" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12442 +/- ##
=========================================
Coverage 59.13% 59.14%
+ Complexity 1881 1879 -2
=========================================
Files 365 365
Lines 13813 13814 +1
Branches 1460 1460
=========================================
+ Hits 8169 8170 +1
Misses 5114 5114
Partials 530 530
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0d8d4cf to
8e3d177
Compare
Add support for PlatformIO (https://platformio.org/) embedded C/C++ projects, detected via `platformio.ini`. PlatformIO does not provide a unified interface for querying all dependencies; libraries declared via `lib_deps` (and their own transitive dependencies) are parsed from the `.pio/libdeps/<env>` directory populated by `pio pkg install` as well as the local `lib/` directory, while platform and framework dependencies are parsed from the output of `pio pkg list`. The output of `pio pkg list` is a human-readable tree rather than JSON or another machine-readable format, and includes every package the platform's manifest declares as usable. For packages like `ststm32` this lists all possible sub-packages, e.g. both `framework-stm32cubef1` and `framework-stm32cubeh7`, even though only one might be used by the actual build. For framework dependencies we must determine the actually-used packages by invoking `pio project metadata --json-output`, which we can use to filter the overall list. Signed-off-by: Ryan Zoeller <ryan.zoeller@aliaro.com>
Signed-off-by: Ryan Zoeller <ryan.zoeller@aliaro.com>
8e3d177 to
3c0b6d9
Compare
|
Thanks for this @rtzoeller, good to see you back after #9727 and #9729. Implementing a whole new package manager is a major contribution - like the direction you are going. CI was failing and as likely none of us maintainers know PlatformIO, so I asked Claude to help track it down. Root cause: PlatformIO Core 6.2.0 installs the platform_packages pin tool-scons@~4.40801.0, then installs its own required ~4.41101.0 and removes the pinned version again - SCons is a Core tool rather than an atmelavr platform package, so it then drops out of pio pkg list --only-platforms entirely and the expected output can't be produced. ef7b13b fixes it by pinning the platform, its packages and all libraries (including transitive ones) to exact versions, and moving the platform_packages override onto packages the platform actually manages. Feel free to cherry-pick it, or say the word and I'll push it to your branch. I also had it review the PR. You know PlatformIO far better than we do, so please push back on anything where it's misread the tooling - it's a mix of real bugs, open questions and nits, and it hasn't been validated against real-world projects beyond the synthetic one. Open issues - PR #12442 (PlatformIO package manager)Correctness1. The comment asserts the field is "a comma-separated list of library names, without any owner or version
So a real entry yields 2. The spec only says "a key=value properties list… UTF-8 encoded" — it is not a Java 3. Libraries in a dependency cycle disappear entirely — val transitiveNames = rawLibraries.values.flatMapTo(mutableSetOf()) { raw -> raw.dependencies.map { it.name } }
val rootNames = rawLibraries.keys - transitiveNames
return rootNames.mapNotNull { resolve(it) }The pre-registration guard in 4. Unresolvable dependency edges are dropped silently —
5. A missing
6. Dependencies are matched by bare name, ignoring
Design questions (not blockers)7. Root detection ignores 8. All 9. 10. Project identity is Nits
|
Add support for PlatformIO embedded C/C++ projects, detected via
platformio.ini.PlatformIO does not provide a unified interface for querying all dependencies; libraries declared via
lib_deps(and their own transitive dependencies) are parsed from the.pio/libdeps/<env>directory populated bypio pkg installas well as the locallib/directory, while platform and framework dependencies are parsed from the output ofpio pkg list.The output of
pio pkg listis a human-readable tree rather than JSON or another machine-readable format, and includes every package the platform's manifest declares as usable. For packages likeststm32this lists all possible sub-packages, e.g. bothframework-stm32cubef1andframework-stm32cubeh7, even though only one might be used by the actual build. For framework dependencies we must determine the actually-used packages by invokingpio project metadata --json-output, which we can use to filter the overall list.