Intellisense broken with wildcard config

Hello,
Intellisense is broken if using wildcard configurations in extra_config. Tryed already to rebuild Intellisense. Only one node.ini (see project structure) is processed, that from exec_node. If I put node.ini content to platformio.ini after rebuilding Intellisense, everything magically works.

Project structure:

proj/platformio.ini
proj/src/brain_node/node.ini
proj/src/exec_node/node.ini

Content of platformio.ini:

[platformio]
extra_configs = src/*/node.ini

[base_env]
base_extra_scripts = 
    pre:scripts/add_inc_src.py

add_inc_src.py loads additional src and includes with CPPPATH and SRC_FILTER

Content of add_inc_src.py:

Import("env")
from os import path

PIOENV = env.subst("$PIOENV")
PROJECT_SRC_DIR = env.subst("$PROJECT_SRC_DIR")

#add include path
env.Append(
    CPPPATH=[path.join(PROJECT_SRC_DIR, PIOENV, "inc")]
)

#add src path
env.Append(
    SRC_FILTER=["+<"+ PIOENV +">"]
)

Relevant part of the c_cpp_properties.json is:
{
“configurations”: [
{
“name”: “PlatformIO”,
“includePath”: [
“proj/include”,
“proj/src”,
“proj/src/exec_node/inc”,

}

With regards,
Ivan

And what’s in these files?

Ha, sorry) Forgot to attach)

proj/src/exec_node/node.ini

[env:exec_node]
platform = ststm32
board = nucleo_h743zi
framework = arduino
extra_scripts = 
    ${base_env.base_extra_scripts}

proj/src/brain_node/node.ini

[env:brain_node]
platform = ststm32
board = nucleo_h743zi
framework = arduino
extra_scripts =
    ${base_env.base_extra_scripts}
build_flags = -I include23

I can’t reproduce the problem. Can you clone https://github.com/maxgerhardt/pio-lib-access-project-include, open a CLI, cd into the cloned folder an execute pio init --ide=vscode? Is the resulting .vscode/c_cpp_properties.json still empty?

Still the same…

“/xx/pio-lib-access-project-includes/src/brain_node/inc”

not appearing in c_cpp_properties.json

MacOS Version: 10.13.6
PIO: 5.2.1
VSCODE: 1.61.0

Hm please open a CLI and execute pio upgrade --dev so that we are on the same version.

I omitted to create that folder, does it change when the folder is created?

Upgraded to dev. Showing still the same version 5.2.1. Nothing changed. Tried with inc folder and without, also with content that is referenced in main.cpp. Still no change in c_cpp_properties.json. It shows only exec_node/inc being added, but not brain_node/inc. Everything compiles.

Might be a Mac specific problem? Post to Issues · platformio/platformio-core · GitHub. I can’t verify it on Mac since I don’t have one.

Issue opened: