Skip to content

Commit 69ae38e

Browse files
authored
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: arduino/arduino-cli@38479dc Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 9a6a457 commit 69ae38e

File tree

88 files changed

+6494
-3921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6494
-3921
lines changed

.vscode/launch.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@
9494
"--colors",
9595
"**/${fileBasenameNoExtension}.js"
9696
],
97+
"outFiles": [
98+
"${workspaceRoot}/electron-app/src-gen/backend/*.js",
99+
"${workspaceRoot}/electron-app/src-gen/frontend/*.js",
100+
"${workspaceRoot}/electron-app/lib/**/*.js",
101+
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js",
102+
"${workspaceRoot}/node_modules/@theia/**/*.js"
103+
],
97104
"env": {
98105
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json",
99106
"IDE2_TEST": "true"

arduino-ide-extension/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@
123123
"mockdate": "^3.0.5",
124124
"moment": "^2.24.0",
125125
"ncp": "^2.0.0",
126-
"protoc": "^1.0.4",
127126
"rimraf": "^2.6.1",
128127
"shelljs": "^0.8.3",
129128
"uuid": "^3.2.1",
130129
"yargs": "^11.1.0"
131130
},
132131
"optionalDependencies": {
133-
"grpc-tools": "^1.9.0"
132+
"grpc-tools": "^1.9.0",
133+
"protoc": "^1.0.4"
134134
},
135135
"mocha": {
136136
"require": [
@@ -172,10 +172,14 @@
172172
],
173173
"arduino": {
174174
"arduino-cli": {
175-
"version": "0.33.1"
175+
"version": {
176+
"owner": "arduino",
177+
"repo": "arduino-cli",
178+
"commitish": "38479dc"
179+
}
176180
},
177181
"arduino-fwuploader": {
178-
"version": "2.2.2"
182+
"version": "2.3.0"
179183
},
180184
"arduino-language-server": {
181185
"version": "0.7.4"

arduino-ide-extension/scripts/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ function buildFromGit(command, version, destinationPath, taskName) {
113113
shell.echo(`<<< Checked out ${commitish}.`);
114114
}
115115

116+
exec('git', ['-C', tempRepoPath, 'rev-parse', '--short', 'HEAD'], shell);
117+
116118
shell.echo(`>>> Building the ${taskName}...`);
117119
exec(command, ['build'], shell, { cwd: tempRepoPath, encoding: 'utf8' });
118120
shell.echo(`<<< Done ${taskName} build.`);

arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import { SketchesServiceClientImpl } from './sketches-service-client-impl';
2727
import { CoreService, CoreServicePath } from '../common/protocol/core-service';
2828
import { BoardsListWidget } from './boards/boards-list-widget';
2929
import { BoardsListWidgetFrontendContribution } from './boards/boards-widget-frontend-contribution';
30-
import { BoardsServiceProvider } from './boards/boards-service-provider';
30+
import {
31+
BoardListDumper,
32+
BoardsServiceProvider,
33+
} from './boards/boards-service-provider';
3134
import { WorkspaceService as TheiaWorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
3235
import { WorkspaceService } from './theia/workspace/workspace-service';
3336
import { OutlineViewContribution as TheiaOutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
@@ -61,7 +64,6 @@ import {
6164
BoardsConfigDialog,
6265
BoardsConfigDialogProps,
6366
} from './boards/boards-config-dialog';
64-
import { BoardsConfigDialogWidget } from './boards/boards-config-dialog-widget';
6567
import { ScmContribution as TheiaScmContribution } from '@theia/scm/lib/browser/scm-contribution';
6668
import { ScmContribution } from './theia/scm/scm-contribution';
6769
import { SearchInWorkspaceFrontendContribution as TheiaSearchInWorkspaceFrontendContribution } from '@theia/search-in-workspace/lib/browser/search-in-workspace-frontend-contribution';
@@ -100,7 +102,7 @@ import {
100102
FrontendConnectionStatusService as TheiaFrontendConnectionStatusService,
101103
ApplicationConnectionStatusContribution as TheiaApplicationConnectionStatusContribution,
102104
} from '@theia/core/lib/browser/connection-status-service';
103-
import { BoardsDataMenuUpdater } from './boards/boards-data-menu-updater';
105+
import { BoardsDataMenuUpdater } from './contributions/boards-data-menu-updater';
104106
import { BoardsDataStore } from './boards/boards-data-store';
105107
import { ILogger } from '@theia/core/lib/common/logger';
106108
import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider';
@@ -208,7 +210,6 @@ import {
208210
MonacoEditorFactory,
209211
MonacoEditorProvider as TheiaMonacoEditorProvider,
210212
} from '@theia/monaco/lib/browser/monaco-editor-provider';
211-
import { StorageWrapper } from './storage-wrapper';
212213
import { NotificationManager } from './theia/messages/notifications-manager';
213214
import { NotificationManager as TheiaNotificationManager } from '@theia/messages/lib/browser/notifications-manager';
214215
import { NotificationsRenderer as TheiaNotificationsRenderer } from '@theia/messages/lib/browser/notifications-renderer';
@@ -445,11 +446,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
445446
bind(BoardsServiceProvider).toSelf().inSingletonScope();
446447
bind(FrontendApplicationContribution).toService(BoardsServiceProvider);
447448
bind(CommandContribution).toService(BoardsServiceProvider);
449+
bind(BoardListDumper).toSelf().inSingletonScope();
448450

449451
// To be able to track, and update the menu based on the core settings (aka. board details) of the currently selected board.
450-
bind(FrontendApplicationContribution)
451-
.to(BoardsDataMenuUpdater)
452-
.inSingletonScope();
453452
bind(BoardsDataStore).toSelf().inSingletonScope();
454453
bind(FrontendApplicationContribution).toService(BoardsDataStore);
455454
// Logger for the Arduino daemon
@@ -478,7 +477,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
478477
bind(OpenHandler).toService(BoardsListWidgetFrontendContribution);
479478

480479
// Board select dialog
481-
bind(BoardsConfigDialogWidget).toSelf().inSingletonScope();
482480
bind(BoardsConfigDialog).toSelf().inSingletonScope();
483481
bind(BoardsConfigDialogProps).toConstantValue({
484482
title: nls.localize(
@@ -751,6 +749,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
751749
Contribution.configure(bind, CloudSketchbookContribution);
752750
Contribution.configure(bind, CreateCloudCopy);
753751
Contribution.configure(bind, UpdateArduinoState);
752+
Contribution.configure(bind, BoardsDataMenuUpdater);
754753

755754
bindContributionProvider(bind, StartupTaskProvider);
756755
bind(StartupTaskProvider).toService(BoardsServiceProvider); // to reuse the boards config in another window
@@ -879,9 +878,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
879878
),
880879
});
881880

882-
bind(StorageWrapper).toSelf().inSingletonScope();
883-
bind(CommandContribution).toService(StorageWrapper);
884-
885881
bind(NotificationManager).toSelf().inSingletonScope();
886882
rebind(TheiaNotificationManager).toService(NotificationManager);
887883
bind(NotificationsRenderer).toSelf().inSingletonScope();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy