PSA: watch out for behavior with third-party platform installs

I just got past a rather maddening round of debugging wherein I downloaded a vendor’s example project for a new ESP32-based board, and immediately thereafter all of my other ESP32 projects, which had previously been working fine, then failed to build with a myriad of build issues.

As near as I can tell, here’s what happened:
The new vendor example project happened to install a third-party fork of the PIO ESP32 platform, specifically platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF53 - which PIO installs as simply espressif32.
From that point forward, any other project which uses platform = espressif32 simply uses that third-party platform as-is instead of installing the first-party PIO espressif32 like it would if you were starting from scratch.
I found that by using platform = platformio/espressif32 it would go and install the first-party one, at which point my other projects returned to building successfully.

So, just sharing this as a cautionary tale. Most places in the docs seem to use platform = espressif32 in example code, but it seems a little wiser to me to be more explicit and use platform = platformio/espressif32 to help mitigate this particular risk that a given project could get broken because of a global environment change that was caused by some other project.

Both things are expected behavior.

Automatic installation of third party platform:

When a project specifies a thirdparty platform and this platform is not installed yet, PlatformIO will install the missing platform. (Same as lib_deps). Example:

platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF53

Wrong platform version

If multiple versions of the same platform are installed (in this case “espressif32”) and no version is specified in the platformio.ini (platform = espressif32) the platform with the highest number will be used.

The latest official platform-espressif32 version is “6.12.0
The version number of “https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF53” is “2025.11.30” → 2025.11.30 is higher than 6.12.0.

For this reason, always specify the platform version which is required by your project. For example:

platform = espressif32 @ 6.12.0

Specifiying the version also allows you to have different projects which depends to different platform versions.

1 Like