microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.46k stars 449 forks source link

Investigate passing multiple workspace browse configurations (1 for each target+fileGroup combo) to C/C++ extension #3736

Open snehara99 opened 5 months ago

snehara99 commented 5 months ago

Brief Issue Summary

Currently only 1 target and file group (the last combo) is used to create the workspace browse configuration for c/c++ extension. Maybe working with the C/C++ extension to pass workspace browse configurations for all combinations is a good move which can potentially fix intellisense issues.

Check updateConfigurationData() in cpptools.ts

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

snehara99 commented 5 months ago

@gcampbell-msft as per our convo

v-frankwang commented 4 months ago

Currently only 1 target and file group (the last combo) is used to create the workspace browse configuration for c/c++ extension

@snehara99 Thanks for posting this issue, could you please provide an example? :)

snehara99 commented 4 months ago

Hi @v-frankwang, @gcampbell-msft already has full context on this, but issue #3729 is an example of this where the main target/fileGroup combo was ignored and only the last generated target/fileGroup combo was used, producing the error mentioned in that issue. I have a temporary fix in pre-release for only that specific issue by filtering out generated fileGroups, but ideally there is a better solution that isn't so specific. You can see the corresponding PR that points to the specific section of code where this is a problem.

snehara99 commented 4 months ago

@gcampbell-msft actually told me to open this issue, so I'll add the stale-exempt label so that this issue isn't closed by the stale bot