-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add dotconfig property for c_cpp_properties.json #7845
Conversation
I thinking out loud: #7840 |
@microhobby Is this ready for code review? Does anyone know what "This branch is out-of-date with the base branch" means? |
@sean-mcmanus I will rebase it with the base branch and remove the WIP from the title, so i think it's good for the review. Open to suggestions from maintainers. |
@bobbrow @sean-mcmanus and @Colengms thanks for the review, I will address the comments and as soon as I send the changes commits I will remove the WIP |
@microhobby FYI, 1.6.0 is locked down for shipping next week, but this can go into 1.7.0. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the package.json is missing the "default.dotConfig" setting and the package.nls.json is missing a description for that. I have a bunch of settings added in my branch at https://github.com/microsoft/vscode-cpptools/pull/7816/files if you want an example, but you don't need to use markdownDescription since that is only used in that branch and I can update it later.
@sean-mcmanus thanks for the examples, I add a commit adding it to the package and package.nls.json. Let me know if this is ok. |
@Colengms @michelleangela @bobbrow Does someone else want to review this too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property will also need to be added in the .html file of the IntelliSense Configuration UI.
See https://github.com/microsoft/vscode-cpptools/blob/main/Extension/ui/settings.html and the UI element for "Compile commands" property for example of creating a field for one file path entry.
Place UI element for dotConfig after "Forced include" in the UI. Use title "Dot Config" for the new property.
Also add this new property to https://github.com/microsoft/vscode-cpptools/blob/main/Extension/src/LanguageServer/settingsPanel.ts so that the UI will be updated with values from c_cpp_properties.json
See examples for elementId.compileCommands
in settingsPanel.ts.
compileCommands: "compileCommands", |
case elementId.compileCommands: |
@microhobby To localize HTML content, the following 2 attributes are used on HTML nodes:
The following is an example of a span with localized content, containing a sub-node with a localized title attribute.
Child nodes are not included when content of a parent node is localized. In the outer nodes of the above example, the following string will be extracted for localization: "Switch to the {0} file by clicking on the file link or using the command:" |
@michelleangela thanks for the review, I will work on it. |
FYI, we've changed our settings strings to prefer using markdownDescription, with a hint string -- see #8129 for examples, so for this change you'd use backticks around .config and replace the "" with ``. |
@sean-mcmanus @michelleangela sorry for the delay, I had a few shifts in priorities these past few months, but I'm still on it. I will rebase it and address the proposed changes. Thanks. |
@sean-mcmanus @michelleangela first of all sorry for the delay, I rebased it and addressed the proposed changes. |
@microhobby FYI, we stopped publishing downloadable binaries so you may need to copy over updated ones (see #8691 and #8788). |
It says "This branch is out-of-date with the base branch" -- can that be updated? |
@sean-mcmanus done! |
@microhobby Note that the error message for invalid paths on JSON file works. Example of expected error on UI: Where to get error message for the UI and updating errors on UI:
|
@michelleangela thank you very much for the valuable tips, I push a new commit, tested here and now the error message show as expected. |
@microhobby Could you update your branch again so it is up-to-date with the base branch? Then I'll re-run the checks and check-in the PR. |
Kconfig system generate a .config file with all the defines, CONFIG options selected, to build a project. Examples of projects that use Kconfig system is Linux Kernel and NuttX RTOS. This patch add the `dotConfig` property that will store the path for read a .config file and will concat the defines from file to the extension defines. Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Validate if the path exists and if the path is a valida file. For these add a diagnostic warning to show a squiggle during the file edition. Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
@michelleangela I rebased it with the |
@microhobby |
Some bare metal systems, RTOS and Linux use a generated .config file
with defines needed to build the system and switch features. This patch
add the
dotconfig
property that will store the path for read a.config file and will concat the defines from file to the extension
defines.
Signed-off-by: Matheus Castello matheus@castello.eng.br