Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing paths in metadata json when using build_src_filter (result on broken code insight features with CLion) #4723

Closed
Copper-Bot opened this issue Aug 18, 2023 · 1 comment

Comments

@Copper-Bot
Copy link

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

  1. When opening the export.json, the path dummy/ is missing, and include/ and src/ paths are added twice.
  2. 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

  1. dummy/ folder should be present in the json file.
  2. 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.

@ivankravets
Copy link
Member

Thanks for the report. Please re-test with pio upgrade --dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants