Hello,
There seems to be some issues with build_src_filter and metadata command:
include and src project folders are added twice to the json configuration file when using metadata command.
- When adding
build_src_filter, metadata json file does not change. Others custom source folders are not added.
- When adding
build_src_filter, CLion code insight is broken, even if, in this case, the json file is the same. That could be a plugin issue, and not a PIO-core issue.
Configuration
Operating system: Windows 10
PlatformIO Version: 6.1.10
CLion: 2023.2
PIO CLion plugin: 232.8660.142
Steps to Reproduce
pio init --board nucleo_f446re
- add another folder "dummy" with a dummy .cpp/.h inside
- In the PIO ini file, as shown in the example here, add
build_src_filter to get all .c/.cpp/.h files recursively from the root of the project:
build_src_filter =
+<**/*.c>
+<**/*.cpp>
-<**/*.S>
-<**/*.asm>
- reload project and export metadata json:
> pio project config --json-output
> pio project metadata --json-output -e nucleo_f446re --json-output-path export.json
Actual Results
- When opening the
export.json, the path dummy/ is missing, and include/ and src/ paths are added twice.
- When opening the project with CLion, there are warnings that "code insight features might not work properly" with any source file, even with files already present in
src and include folder.
This result on a broken code insight with CLion (and I suspect with other IDE as well).
Expected Results
dummy/ folder should be present in the json file.
- Clion PIO plugin should still work.
Additional info
About CLion, this seems to be a plugin issue and not a PIO core issue. Should a YouTrack issue be created ?
This issue could be linked with this issue as well: #4718
Because the platformio.ini is using build_src_filter as well, and the user is reporting having issues with CLion code insight.
Hello,
There seems to be some issues with
build_src_filterand metadata command:includeandsrcproject folders are added twice to the json configuration file when using metadata command.build_src_filter, metadata json file does not change. Others custom source folders are not added.build_src_filter, CLion code insight is broken, even if, in this case, the json file is the same. That could be a plugin issue, and not a PIO-core issue.Configuration
Operating system: Windows 10
PlatformIO Version: 6.1.10
CLion: 2023.2
PIO CLion plugin: 232.8660.142
Steps to Reproduce
pio init --board nucleo_f446rebuild_src_filterto get all .c/.cpp/.h files recursively from the root of the project:> pio project config --json-output> pio project metadata --json-output -e nucleo_f446re --json-output-path export.jsonActual Results
export.json, the pathdummy/is missing, andinclude/andsrc/paths are added twice.srcandincludefolder.This result on a broken code insight with CLion (and I suspect with other IDE as well).
Expected Results
dummy/folder should be present in the json file.Additional info
About CLion, this seems to be a plugin issue and not a PIO core issue. Should a YouTrack issue be created ?
This issue could be linked with this issue as well: #4718
Because the
platformio.iniis usingbuild_src_filteras well, and the user is reporting having issues with CLion code insight.