
* fix(plugin): decouple state update from the LS
To enhance the reliability of Arduino IDE extensions, the update
process for `ArduinoState` has been modified to ensure independence
from the language server's availability. This change addresses issues
caused by `compileSummary` being `undefined` due to potential startup
failures of the Arduino Language Server, as noted in
https://github.com/dankeboy36/esp-exception-decoder/issues/28#issuecomment-2681800772.
The `compile` command now resolves with a `CompileSummary` rather than
`void`, facilitating a more reliable way for extensions to access
necessary data. Furthermore, the command has been adjusted to allow
resolution with `undefined` when the compiled data is partial.
By transitioning to direct usage of the resolved compile value for
state updates, the reliance on executed commands for extensions is
eliminated. This update also moves the VSIX command execution to the
frontend without altering existing IDE behavior.
Closes arduino/arduino-ide#2642
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix: install missing libx11-dev and libxkbfile-dev
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix: pick better GH step name
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix: install the required dependencies on Linux
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix(revert): do not manually install deps on Linux
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* chore: pin `ubuntu-22.04` for linux actions
* fix: restore accidentally removed dispose on finally
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix(test): align mock naming 💄
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix: let the ino contribution notify the LS
+ event emitter dispatches the new state.
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* fix(test): emit the new compiler summary state
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
* chore(revert): unpin linux version, use latest
revert of b11bde1c47
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
---------
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Co-authored-by: Giacomo Cusinato <7659518+giacomocusinato@users.noreply.github.com>
Arduino IDE Extension
Arduino IDE is based on Theia, and most of its IDE features, UIs and customizations are implemented in this Theia extension.
IDE Services
IDE services typically have a backend part in src/node/ and a front-end part in src/browser/.
Boards Service
The Boards Service continuously checks the computer's ports, in order to detect when you connect or disconnect an Arduino board.
The Boards Manager lists all the known board types, and allows downloading new cores to get additional board types.
- src/common/protocol/boards-service.ts implements the common classes and interfaces
- src/node/boards-service-impl.ts implements the service backend:
- discovering ports & boards
- searching for compatible board types
- installing new board types
- src/browser/boards/boards-list-widget.ts implements the Boards Manager front-end:
- browsing/searching available board types
- installing new board types
Core Service
The Core Service is responsible for building your sketches and uploading them to a board.
- src/common/protocol/core-service.ts implements the common classes and interfaces
- src/node/core-service-impl.ts implements the service backend:
- compiling a sketch for a selected board type
- uploading a sketch to a connected board
Serial Service
The Serial Service allows getting information back from sketches running on your Arduino boards.
- src/common/protocol/serial-service.ts implements the common classes and interfaces
- src/node/serial/serial-service-impl.ts implements the service backend:
- connecting to / disconnecting from a board
- receiving and sending data
- src/browser/serial/serial-connection-manager.ts handles the serial connection in the frontend
- src/browser/serial/monitor/monitor-widget.tsx implements the serial monitor front-end:
- viewing the output from a connected board
- entering data to send to the board
- src/browser/serial/plotter/plotter-frontend-contribution.ts implements the serial plotter front-end:
- opening a new window running the Serial Plotter Web App
Config Service
The Config Service knows about your system, like for example the default sketch locations.
- src/common/protocol/config-service.ts implements the common classes and interfaces
- src/node/config-service-impl.ts implements the service backend:
- getting the
arduino-cli
version and configuration - checking whether a file is in a data or sketch directory
- getting the
"arduino"
configuration in the package.json
:
"cli"
:"version"
typestring
|{ owner: string, repo: string, commitish?: string }
: if the type is astring
and is a valid semver, it will get the corresponding released CLI. If the type isstring
and is a date inYYYYMMDD
format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in theowner/repo
will be used. Ifcommitish
is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.
Rebuild gRPC protocol interfaces
- Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command
yarn --cwd arduino-ide-extension generate-protocol
Update clangd and ClangFormat
The clangd C++ language server and the ClangFormat code formatter tool dependencies are managed in parallel. Updating them to a different version is done by the following procedure:
- If the target version is not already available from the
arduino/clang-static-binaries
repository, submit an issue there requesting a build and wait for that to be completed. - Validate the ClangFormat configuration for the target version by following the instructions here
- Submit a pull request in the
arduino/arduino-ide
repository to update the version in thearduino.clangd.version
key ofpackage.json
. - Submit a pull request in the
arduino/tooling-project-assets
repository to update the version in thevars.DEFAULT_CLANG_FORMAT_VERSION
field ofTaskfile.yml
.
Customize Icons
ArduinoIde uses a customized version of FontAwesome. In order to update/replace icons follow the following steps:
- import the file
arduino-icons.json
in Icomoon - load it
- edit the icons as needed
- !! download the new
arduino-icons.json
file and put it in this repo - Click on "Generate Font" in Icomoon, then download
- place the updated fonts in the
src/style/fonts
directory