The sketch code formatter configuration is passed to the ClangFormat tool as a string representing a JSON object via a
command line argument.
Previously, the contents of this string were not given any special treatment to ensure compatibility with the command
interpreter used on Windows machines. That did not result in problems only because the configuration didn't contain
problematic combinations of characters. This good fortune will not persist through updates to the configuration, so the
command must be properly processed.
The Windows command interpreter does not use the POSIX style backslash escaping. For this reason, escaped quotes in the
argument are recognized as normal quotes, meaning that the string alternates between quoted and unquoted states at
random. When a character with special significance to the Windows command interpreter happens to occur outside a quoted
section, an error results.
The solution is to use the Windows command interpreter's caret escaping on these characters. Since such an escaping
system is not recognized by POSIX shells, this is only done when the application is running on a Windows machine.
References:
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo#remarks
- https://en.wikipedia.org/wiki/Escape_character#Windows_Command_Prompt
The sketch code formatter configuration is passed to the ClangFormat tool as a string representing a JSON object via a
command line argument.
The quotes in the JSON syntax are escaped in order to make them compatible with this usage. Previously, consideration
was not given to escaping of the content. For example, with the previous escaping code, this content: `\"` would be
converted to `\\"`, whereas the correct escaping would look like `\\\"`.
That did not result in problems only because the configuration didn't contain escaped content. This good fortune will
not persist through updates to the configuration so the command must be properly processed.
The content of the configuration will now be escaped in addition to the quotes of the JSON data format.
- Debounced the connectivity status update.
- Silent the output channel for the Arduino LS.
- Delay the problem markers update with 500ms.
- Do not update the status bar on every `keypress` event.
- Debounced the tab-bar toolbar updates when typing in editor.
- Fixed electron menu contribution binding.
- Aligned the editor widget factory's API to Theia.
- Set the zoom level when the app is ready (Closes#1244)
- Fixed event listener leak (Closes#1062)
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
* use theme service on settings load
* use window.matchMedia in loadSettings
* typo fix
* Patched app config to dispatch on OS' theme.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Co-authored-by: Akos Kitta <a.kitta@arduino.cc>
* move initialization of libs and platforms into new contribution
* use noOverwrite when install built-in libraries and platform
* catch errors when installing platforms and libraries at first start-up
* arduino-cli version 0.25.0-rc1
* refine platforms and libraries initialization in case of errors
* add trailing newline when libraries and platform installation fail
* use regex to check error if builtin library dependencies are already installed
* rename contribution
Restored monitor service creation state before a36524e:
Pass core client provider into new instances as a field.
Closes#1161
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>