-
Notifications
You must be signed in to change notification settings - Fork 236
Autogenerate c_cpp_properties.json #1107
Autogenerate c_cpp_properties.json #1107
Conversation
* Tried to identify most of the tasks * Added beer money support option
…t-in compiler header include paths
* First injection of the compiler command parser and IntelliSense auto-configuration. Currently injected into "verify" only. * Updated branch documentation to reflect the current state of this project
…n a pull request :)
…e replication, better maintainablility and readability * Added pre-build command to "upload using programmer" since it was (probably unintentional) missing there
* Notes where to run the auto-generation
…uto-configuration to be turned off * Prepared the compiler parser code to be injected into "upload" and "upload using programmer" without overhead * Updated intellisense.ts to use only "let" instead of "var" which is much safer * Updated branch documentation
…figuration flag which can override the global flag
* Removed a redundand condition
* Made compile command regex match more stringent
…(comment)) * Added some ideas how to implement a better serial monitor
* Implemented c_cpp_properties merging -> compiler analysis results are merged into existing configuration and will preserve configurations of different name than the vscode-studio default configuration name (currently "Arduino"). This opens up the possibility for users to write their own configurations without having to disable the autogeneration. * Implemented "write on change" - `c_cpp_properties.json` will only be written if a new configuration has been detected.
…le flags for analyze only. Now these flags have the same effect during regular builds.
* Added post build command support * Added validator for both pre and post build (former was missing) Yet to be decided: Solution for analysis run: with or without pre/post build? Addresses microsoft#786
* Compacted log message filter regexes * Moved pre-build command after initialization of the output folder in case this command somehow wants to operate on it somehow * Better error message handling when post-build command fails * Forwarding post-build command error
* Environment variables for pre-/post-build commands which give the user access to several build process parameters like the sketch, the output directory, serial port, build mode (verify, upload, analyze, ...), board type and workspace path Addresses microsoft#786
… sketch wasn't initialized) * More info in error message for uncaught exception during build cleanup * Note on output path preparation which seems to be a bit wonky
…are applied during any build and can be used to set custom compiler flags and defines for instance. Addresses microsoft#975
* Documentation for `buildPreferences`
* Web-server for library-, board-manager etc. was not listening on localhost but on the machine's main interface * Web-server wasn't launched asynchronously what can cause problems * Port was stored redundantly in webserver class Addresses microsoft#966
Is this ready for a review? If so I'll see if I can add it to the queue after we get the serial port issue resolved. |
For a general code review, yes, but it was built against an older version of the extension and there was no time to update it yet. Do you want to have a look anyway or should it merge the current master first? |
We'll discuss tomorrow morning here. Thank you for providing the PR, apologies it has sat here for so long. |
@iFreilicht, can you rebase the current master branch on to this pr |
Hi. I am not @iFreilicht, but I have rebased the branch on top of the latest master branch, see https://github.com/hlovdal/vscode-arduino/tree/intellisense-autoconfig.rebased. I have reviewed each of the rebased commits to see that they looked valid and have compiled and tested with the resulting branch which generated a proper |
Fixes #438, #808, #969
Potentially fixes other issues that stem from an incorrectly set up
c_cpp_properties.json
.This PR adds an autogeneration mechanism to the extension. This way, library paths and macro definitions are added to
c_cpp_properties.json
automatically.This fork is unfortunately a little older, so there may be some conflicts to fix, but I want to get it onto the radar, as it is a huge quality of life improvement and I've exclusively been using the development build of this fork because of that.
Builds of this fork of the extension can be found in this dropbox folder. Discussion around it is in #438 and this gitter chatroom.
Tagging @elektronikworkshop