Open episource opened 6 months ago
That would be extremely concerning if true, because the
AlwaysBuild(env.Alias("upload", upload_source, upload_actions))
construct comes from the standard PlatformIO platforms, like in platform-ststm32. If that's wrong, everything else is wrong too, and I don't yet see this being fixed in all other platforms. Can you push https://github.com/platformio/platformio-core/issues/4477 again?
1. General Improvement Currently only platform targets are included in
pio project metadata
output. This output is backed by__PIO_TARGETS
environment variable, which currently only includes explicit targets (e.g. added usingenv.AddPlatformTarget
). Builtin targets are not included in this list. With one notable exception: For embedded platforms without explicit platform targets, theupload
target is added to the list.There is already an platformio/platformio-core#4477 issue related to the
pio run --list-targets
output, which is backed by the metadata. The tickets requests a more complete output.Nevertheless, the
upload
target is highly platform specific. So makes sense to not include this target if platform defines its own targets.Therefore I'd like to request the raspberrypi platform to explicitly advertise its
upload
target by usingAddPlatformTarget("upload, ...)
instead ofAlias("upload", ...)
.2. Side effect: Fixes Jetbrains Clion integration This also fixes broken Jetbrains Clion integration for the
upload
target of projects based on this raspberrypi platform:Clion uses
pio project metadata
to figure out available targets. The play button of platformio run configurations is bound to the existance of theupload
target in the metadata. Ifupload
target is missing inpio project metadata
, clicking the play button leads to error messagePlatformIO: Upload action is not available for this PlatformIO env
. Additionally theupload
target and dependent actions won't show up in Clions PlatformIO pane.