899 Commits

Author SHA1 Message Date
Akos Kitta
d419a6c6f0 feat: preference to limit thread count of the LS
Added a new preference (`arduino.language.asyncWorkers`) to control the
number of async workers used by `clangd`.
Users can fine tune the `clangd` thread count to overcome the excessive
CPU usage.

Use 0.1.2 Arduino Tools VSIX in IDE2.

Ref: arduino/arduino-language-server#177
Ref: arduino/vscode-arduino-tools#46

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-02-07 12:28:57 +01:00
Akos Kitta
763fde036c feat: disable debug widget if unsupported by board
Remove the 'Add configuration...' select option from the debug widget.

Closes #14

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-01-31 12:04:29 +01:00
Akos Kitta
0ca1a31747 fix: board <select> update on board detach
When the previously selected board is not detected, unset the `<select>`
option.

Closes #2222

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-01-15 09:25:10 +01:00
Akos Kitta
d01f95647e fix: sketch Save As errors on name collision
The Save As operation is halted and the problem clearly communicated to
the user when there is a collision between the target primary source
file name and existing secondary source files of the sketch.

Closes #827

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-01-15 09:24:50 +01:00
Akos Kitta
074f654457 fix: sketch Save As preserves the folder structure
This commit rewrites how IDE copies sketches as part of the _Save As_
operation. Instead of copying to the destination, IDE copies the sketch
into a temporary location, then to the desired destination.

This commit drops [`cpy`](https://www.npmjs.com/package/cpy).
Ref: 47b89a70b5

Closes #2077

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-01-15 09:24:50 +01:00
Akos Kitta
3eef857b48 fix: can open IDE from an ino file
Use a fallback frontend app config when starting IDE2 from an ino file
(from Explorer, Finder, etc.) and the app config is not yet set.

Closes #2209

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-01-15 09:16:11 +01:00
Akos Kitta
73b6dc4774 feat: use new debug -I -P CLI output
- Can pick a programmer if missing,
 - Can auto-select a programmer on app start,
 - Can edit the `launch.json`,
 - Adjust board discovery to new gRPC API. From now on, it's a client
 read stream, not a duplex.
 - Allow `.cxx` and `.cc` file extensions. (Closes #2265)
 - Drop `debuggingSupported` from `BoardDetails`.
 - Dedicated service endpoint for checking the debugger.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-12-13 17:32:07 +01:00
Akos Kitta
42bf1a0e99 test: test Arduino state update for extensions
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-12-13 17:32:07 +01:00
Akos Kitta
5abdc18fcc fix: make hosted plugin support testable
Hide the concrete implementation behind an interface so that tests can
`require` it.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-12-13 17:32:07 +01:00
Akos Kitta
633346a3b0 feat: new window inherits the custom board options
A new startup task ensures setting any custom board menu selection in a
new sketch window.

Closes #2271

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-12-13 17:32:07 +01:00
Akos Kitta
64ce35edbb feat: show in tooltip if core is from sketchbook
Closes #2270

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-12-13 17:32:07 +01:00
Akos Kitta
153e34f11b chore(deps): update dependencies
To fix all security vulnerabilities detected by `Dependabot`.

 - remove `shelljs`. replace with `fs` and `console`.
 - remove `uuid`. replace with `@phosphor/coreutils`.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-10-13 08:50:39 +02:00
Akos Kitta
a8e63c8c90 test: relax accessible sketch path test condition
- Do not expect `EACCESS` on Linux.
 - Run the test only if `EACCESS` occurs via the `stat` syscall.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-10-09 19:24:51 +02:00
Akos Kitta
0b2410d49a
test: run cloud sketches tests on the CI (#2092)
- fix(test): integration tests are more resilient.
   - run the Create integration tests with other slow tests,
   - queued `PUT`/`DELETE` requests to make the test timeout happy,
   - reduced the `/sketches/search` offset to 1/5th and
   - remove Create API logging.
 - fix(linter): ignore `lib` folder. Remove obsolete `.node_modules`
pattern.
 - feat(ci): enable Create API integration tests.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Co-authored-by: per1234 <accounts@perglass.com>
2023-10-07 10:38:54 +02:00
Akos Kitta
57975f8d91
fix: use board+port at startup if it's restored (#2242)
- update status bar if board+port is restored,
 - refresh the debug toolbar if board+port is restored,
 - init `Include Library` if board+port is ready, and
 - init library examples if board+port is ready

Closes #2237
Closes #2239

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-10-05 14:41:14 +02:00
Akos Kitta
8f4bcc83ec
chore(deps): update to theia@1.41.0 (#2211)
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-09-29 18:40:13 +02:00
Akos Kitta
ce02e263ec fix: storage service injection
Store the board config data per sketch and not per IDE installation.

The (Theia) default `StorageService` implementation is workspace-scoped
when `@theia/workspace` is part of the final application.

Closes #2240

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-09-27 17:34:24 +02:00
Akos Kitta
8a5dee9307 chore: format resources 💄
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-09-26 10:06:47 +02:00
Akos Kitta
7f660d76a8 fix: refresh the user-fields at app startup
Ref: arduino/arduino-ide#2165
Closes arduino/arduino-ide#2230

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-09-26 09:57:02 +02:00
Akos Kitta
9f48296d4d fix: defer board+port state update for extensions
If it is set before the board+port settings are restored from the
`localStorage`, extensions will see no board+port.

Ref: arduino/arduino-ide#2165
Ref: dankeboy36/esp-exception-decoder#10

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-09-26 09:56:34 +02:00
Akos Kitta
ec28623a97
fix: forward backend logging to electron (#2236)
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-09-26 09:45:03 +02:00
Akos Kitta
f0704b678c fix(i18n): corrected the module for tr and ru
Closes arduino/arduino-ide#2201

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-31 08:48:05 +02:00
Akos Kitta
8d2808893c fix: name of translation (UA) module
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-29 08:21:11 +02:00
Akos Kitta
e08439b6a4
fix: missing app icon for AppImage on Linux (#2190)
Closes #131

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-24 17:04:58 +02:00
Akos Kitta
5fd02b9fd7 fix: falsy context menu handlerId
The very first context menu item with ID `0` has not had a click handler

Ref: eclipse-theia/theia#12500
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-22 08:51:00 +02:00
per1234
10b38820bc Generalize name of "Firmware Updater"
Some Arduino boards have a supplemental hardware module that provides functionality separate from the primary
microcontroller the sketch program runs on.

Enhancements or fixes to the firmware that runs on these supplemental modules may be made over time so it is important
for the users of these boards to have an easy way to update the firmware. Arduino IDE provides a tool for doing this.

At the time the tool was created, the poor choice was made to include the names of the specific modules it supported at
the time in the tool's name. As was inevitable, that list has changed, rendering the tool name no longer accurate.

The immediate problem is that support has been added for updating the "bridge" and radio module on the UNO R4 WiFi. That
module is neither a "WiFi101" nor a "NINA", so the tool name does not reflect the support for the UNO R4 WiFi.

More significant changes in the supported modules are under way and will be introduced in the next release:

- Dropping support for the "WiFi101" module
- Adding support for the module on the Portenta C33 board

Rather than attempting to maintain a regularly changing and overly verbose name that includes the list of every
supported module, it is better to use a name for the tool that only describes its general purpose, leaving the task of
describing the specific supported modules to the documentation.
2023-08-21 08:44:10 -07:00
Akos Kitta
57fa18b940 fix: do not start obsolete daemon watcher process
Before arduino/arduino-cli#488, IDE2 required a way to stop the daemon
process if the parent (backend) process crashed. However, this mechanism
is no longer necessary as the CLI daemon process is not actually a true
daemon process.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-20 21:54:13 +02:00
Akos Kitta
2aae9e0a07 fix: execute the Arduino CLI without a shell
Closes arduino/arduino-ide#2112
Ref: arduino/arduino-ide#2067

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-20 21:54:13 +02:00
Akos Kitta
9a99957e73
fix: incorrect certificate flashing command string (#2181)
Use a `string` array of command flags instead of the concatenated final
`string` command.

Ref: arduino/arduino-ide#2067
Closes arduino/arduino-ide#2179

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-20 21:53:43 +02:00
Akos Kitta
b25665561e fix: handle UNKNOWN code on syscall: 'stat'
Closes #2166

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-20 17:15:00 +02:00
Akos Kitta
db01efead3 fix: expand boards if available on detected port
moved the board inference logic from UI to  model

Closes #2175

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-20 17:14:29 +02:00
Akos Kitta
69ae38effa
feat: simplify board and port handling (#2165)
Use Arduino CLI revision `38479dc`

Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158

Ref: 38479dc706

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-18 14:42:50 +02:00
Akos Kitta
9a6a457bc4
chore(deps): Updated to Theia 1.39.0 (#2144)
- update Theia to `1.39.0`,
 - remove the application packager and fix the security vulnerabilities,
 - bundle the backed application with `webpack`, and
 - enhance the developer docs.

Co-authored-by: Akos Kitta <a.kitta@arduino.cc>
Co-authored-by: per1234 <accounts@perglass.com>

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-14 12:12:05 +02:00
coby2023t
e17472ef07
Add 中文(繁體) ("Chinese (Traditional)") localization (#2151)
This will add a "中文(繁體)" option to the "Language" menu in the Arduino IDE preferences, which will cause the strings
in the IDE UI to be localized for "Chinese (Traditional)".

In addition to the translations for the strings that originate from the Eclipse Theia IDE framework provided by the
"Chinese (Traditional) Language Pack for Visual Studio Code" language pack, this will also utilize the translations of
the Arduino IDE-specific strings contributed by the community.
2023-07-25 23:52:04 -07:00
dankeboy36
f6a43254f5 feat: can dock the monitor widget to the "right"
Added a new preference (`arduino.monitor.dockPanel`) to specify the
location of the application shell where the _Serial Monitor_ widget
resides. The possible values are `"bottom"` and `"right"`. The default\
value is the `"bottom"`.

The dock panel is per application and not per workspace or window.
However, advanced users can create the `./.vscode/settings.json` and
configure per sketch preference.

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2023-07-13 09:42:47 +02:00
Akos Kitta
94d2962985 fix: include all log args in the log message
- In the bundled application, the customized logger that writes the log
files bogusly includes only the first message fragment in the log
message. This PR ensures all message fragments are included in the final
message before it is printed to the console/terminal and persisted to
the rotating log files.
 - Includes messages with `debug` severity in the log.
 - Disables the ANSI coloring in the CLI daemon log by adding the
`NO_COLOR=true` environment variable to the spawned CLI daemon process.
 - Trims trailing line ending of the daemon log.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-07-07 17:28:16 +02:00
dankeboy36
954fee41a0 fix(terminal): split-terminal visibility
Removed the toolbar contribution from the UI.

Ref: eclipse-theia/theia#12626/
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2023-07-05 16:58:44 +02:00
dankeboy36
0bcb182ec0 fix(terminal): widget flickering on resize
Ref: eclipse-theia/theia#12587
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2023-07-05 16:58:44 +02:00
dankeboy36
42d017e876 feat: expose Arduino state to VS Code extensions
- Update a shared state on fqbn, port, sketch path, and etc. changes.
VS Code extensions can access it and listen on changes.
 - Force VISX activation order: API VSIX starts first.

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2023-07-05 16:58:44 +02:00
Akos Kitta
a5c9735619 Revert "Revert "chore(cli): Bumped the CLI version to 0.33.0""
This reverts commit d0bce15f8baaa17b0272a5b8c0ba45e5577ed3a9.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-07-05 09:31:23 +02:00
Akos Kitta
d0bce15f8b Revert "chore(cli): Bumped the CLI version to 0.33.0"
This reverts commit 0fbd1fbe85fbbd864ad5e6a00850b32cbd2e83e0.
2023-06-30 14:02:08 +02:00
Akos Kitta
8f8b46fa6f fix: warn user when IDE cannot save the sketch
Happens when the IDE2 backend process crashes, and the communication
drops between the client and the server.

Closes #2081

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-06-09 12:11:31 +02:00
Akos Kitta
4af488b05e fix: relaxed saveAll if no Internet connection
The previous logic has incorrectly bailed the save when there is no
Internet connection. The corrected logic disallows saving files if there
is no connection between the frontend and the backend.

Ref: cff2c956845e04d320231e8a924d1a47ad016af7
Closes #2079

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-06-08 08:53:47 +02:00
Akos Kitta
db0049d635 fix: omit port from upload request when not set
Previously, if the `port` was not set in IDE2, the compile request
object has been created with an empty port object (`{}`). From now on,
if the port is not specified, IDE2 will create a compile request with
the default `null` `port` value.

Closes #2089

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-06-06 19:40:03 +02:00
Akos Kitta
0fbd1fbe85 chore(cli): Bumped the CLI version to 0.33.0
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-06-06 13:03:46 +02:00
Akos Kitta
9d2297c684 fix: removed unsafe shell when executing process
Ref: PNX-3671

Co-authored-by: per1234 <accounts@perglass.com>
Co-authored-by: Akos Kitta <a.kitta@arduino.cc>

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-06-06 11:39:37 +02:00
Akos Kitta
e47fb2e651 fix: remove setting unsafe innerHTML
As it is vulnerable to stored Cross-Site Scripting.

Ref: PNX-3669
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-05-16 10:57:17 +02:00
Akos Kitta
ee43a12eb7 fix: show no errors if users cancel lib install
Throwing and catching a `UserAbortError` is part of the natural flow.

Closes #2063

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-05-16 10:56:39 +02:00
Akos Kitta
31deeebb49 test: use raw core index-update for the tests
It should make integration tests more resilient on the Windows CI.

From now on, tests are not starting a daemon to initialize the
`directories.data` folder for the test suites but rely on the raw
command. It is required to avoid spawning the discovery processes, which
cannot be terminated on Windows while the daemon is up and running.

Closes #2059

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-05-12 09:40:42 +02:00
Akos Kitta
117b2a4fc7 fix: do not enqueue write operations on conflict
Closes #2051

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-05-11 11:16:49 +02:00