platformio-core: Project build failures when migrating to v6.0.1
What kind of issue is this?
- PlatformIO Core. If you’ve found a bug, please provide an information below.
Configuration
Operating system: Tested on manjaro, debian
PlatformIO Version: 5.2.5 vs 6.0.1
Description of problem
Hi! I’m a developer on the Open Astro Tracker Firmware and we’ve recently found an uptick in build failures for our users when using PlatformIO. After some digging I’ve found that our firmware compiles fine with PIO 5.2.5 but not on 6.0.1. The reason I’m raising this is that it states on the 5.x to 6 migration guide:
PlatformIO Core 6.0 is FULLY BACKWARD COMPATIBLE* with PlatformIO 5.0 projects
Which doesn’t seem to be the case for our firmware 😅
The issue lies somewhere in applying build flags selectively to source files but not libraries. Basically we turn on a lot of compiler warnings for our source code but we don’t want those warnings enabled for libraries (obviously).
Steps to Reproduce
git clone https://github.com/OpenAstroTech/OpenAstroTracker-Firmware
cd OpenAstroTracker-Firmware
python3 -m venv .pio_env
.pio_env/bin/pip install platformio==6.0.1
# basic configuration setup just to compile things
cat <<EOF >> Configuration_local.hpp
#define RA_STEPPER STEPPER_TYPE_ENABLED
#define RA_DRIVER TMC2209_UART
#define RA_MOTOR_CURRENT_RATING 1
#define RA_OPERATING_CURRENT_SETTING 1
#define DEC_STEPPER STEPPER_TYPE_ENABLED
#define DEC_DRIVER TMC2209_UART
#define DEC_MOTOR_CURRENT_RATING 1
#define DEC_OPERATING_CURRENT_SETTING 1
EOF
.pio_env/bin/platformio run -e mksgenlv21
Actual Results
Build failures from -Werror that should only be enabled on repo source files, but it’s coming from libraries.
Expected Results
Builds passing, because 6.x is supposed to be backwards compatible 🥲
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 31 (10 by maintainers)
Thanks, @julianneswinoga!
Yes, sorry that our “FULLY BACKWARD COMPATIBLE” didn’t work with Core 6.0.0. Hope finally Core 6.0.2 will fix all compatibility issues.
It was the biggest release ever with a rich list of additions and changes. We would be thankful if you continue using DEV version of PlatformIO Core and report any issues. Typically, the DEV version is very stable, it is covered with a ton of integration and unit tests. However, planned refactoring might have some influence.
It is stable, just includes extra fixes. See https://github.com/platformio/platformio-core/blob/develop/HISTORY.rst
Well if it isn’t known who did invent it, then I guess he or she already feels too ashamed to admit it 😉
Yep, me too. I simply can’t seem to get my laptop to complete a single build. I only had one build succeed, but that was when connected to power instead of running on battery. So maybe it is kinda timing related? A few of those build errors are related to the generated .cpp (Arduino code) being missing. So perhaps VS code is also inspecting other PIO envs which in turn also generate and delete the .cpp file?
On my desktop PC (roughly 10x as fast as the laptop when considering compiling) I didn’t have as many build issues, but there I already moved back to PIO 5.2.5 as I simply need that one to work.
Thanks for the report! Could you try the latest Development version via
pio upgrade --dev?This is a bug and we fixed it. If the latest dev version works for you, we will release Core 6.0.2.
In my project (ESPEasy), a number of users also report build issues. See for example: https://github.com/letscontrolit/ESPEasy/issues/4068#issuecomment-1134222604
I myself noticed on my laptop that I was also not able to build anymore. Each build varied from scons39.dblite not found, missing setup() and loop() and another one, all alternating on each build attempt. As suggested by one of my users, when building the default env. first, it seems to ‘stabilize’