You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose "effective" SourceFileConfiguration to other extensions #5038
In order to analyze C/C++ source files, our analyzer needs to know compilation settings (compiler, flags, includes, ...). I started to study your extension, and discovered c_cpp_properties.json configuration file, as well as the ability for third party extensions to contribute configuration directly using the extension API: https://github.com/microsoft/vscode-cpptools-api/blob/master/api.ts#L137
I found very similar requests (#1524, #3978) that were closed after the active configuration was exposed, and suggesting to rely on c_cpp_properties.json. But to me this is not a good solution as configuration may also come from the provider api.
I wonder if you would be open to create a new API, not to contribute SourceFileConfiguration, but for a third party extension to read the effective SourceFileConfiguration (the one you will use on the language server side, after resolving all contributions, and maybe after resolving default compiler includes).
Thanks for considering this.
As a personal choice, I would prefer to rely on a clean API, documented, possibly versioned. I feel using commands to exchange data between extensions is a bit 'hacky'.
But in the end this doesn't make a big difference for us, so it's up to you :)
If you could provide a custom/experimental build of vscode-cpptools with this API/command, I would be more than happy to try it and give feedback.
Personally I can live if I have to enter the values using a project setting/configuration. Or rely on the "C/C++ IntelliSense, debugging, and code browsing." extension. It also analyses the source files for coloring and jumping to definitions.
But probably this is already considered.
This feature request has received enough votes to be added to our backlog.
Reacted by Jean-Baptiste Lièvremont, Rijo Joseph C, Florian Berchtold, Tyler, Garrett Smith, Gokul Evuri, Tom Conder, Fernando Pereira, Nepomuk3000, Richard Cheung and 6 more
Activity
bobbrow commentedon Mar 5, 2020
I think we could do this without a modification to the API. I would rather expose this information as a Command.
henryju commentedon Mar 6, 2020
Thanks for considering this.
As a personal choice, I would prefer to rely on a clean API, documented, possibly versioned. I feel using commands to exchange data between extensions is a bit 'hacky'.
But in the end this doesn't make a big difference for us, so it's up to you :)
If you could provide a custom/experimental build of vscode-cpptools with this API/command, I would be more than happy to try it and give feedback.
J-u-n-o commentedon Apr 3, 2020
Personally I can live if I have to enter the values using a project setting/configuration. Or rely on the "C/C++ IntelliSense, debugging, and code browsing." extension. It also analyses the source files for coloring and jumping to definitions.
But probably this is already considered.
github-actions commentedon Oct 19, 2020
This feature request has received enough votes to be added to our backlog.