Open bentron2000 opened 2 months ago
I have just discovered that using 'rebuild intelliSense index' will repopulate the c_cpp_properties.json
file with the correct values.
I don't feel this is intuitive behaviour. This probably requires some additional documentation or an alternative approach to multi environment setups.
When working with multiple environments, libraries installed via
lib_deps
will only have their include path added toc_cpp_properties.json
if they are in the first environment listed inplatformio.ini
.Example:
Once platformio has finished downloading the libraries, they can be found in the
.pio/libdeps/<env>
folders correctly. At this stage, the projects will build properly. However, thec_cpp_properties.json
file does not get updated with the appropriatelibdeps
paths. In this example, only the following lines are added:This results in errors in the IDE stating that the libraries cannot be found. While the projects still build, the issue should not be there and it completely borks any related intellisense.
You can see this in action if you change the order of controller and sensors then rebuild the project.