Skip to content

Commit

Permalink
feat: simplify board and port handling
Browse files Browse the repository at this point in the history
Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed Aug 17, 2023
1 parent 9a6a457 commit e684eec
Show file tree
Hide file tree
Showing 87 changed files with 6,616 additions and 3,880 deletions.
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@
"--colors",
"**/${fileBasenameNoExtension}.js"
],
"outFiles": [
"${workspaceRoot}/electron-app/src-gen/backend/*.js",
"${workspaceRoot}/electron-app/src-gen/frontend/*.js",
"${workspaceRoot}/electron-app/lib/**/*.js",
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js",
"${workspaceRoot}/node_modules/@theia/**/*.js"
],
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json",
"IDE2_TEST": "true"
Expand Down
12 changes: 8 additions & 4 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@
"mockdate": "^3.0.5",
"moment": "^2.24.0",
"ncp": "^2.0.0",
"protoc": "^1.0.4",
"rimraf": "^2.6.1",
"shelljs": "^0.8.3",
"uuid": "^3.2.1",
"yargs": "^11.1.0"
},
"optionalDependencies": {
"grpc-tools": "^1.9.0"
"grpc-tools": "^1.9.0",
"protoc": "^1.0.4"
},
"mocha": {
"require": [
Expand Down Expand Up @@ -172,10 +172,14 @@
],
"arduino": {
"arduino-cli": {
"version": "0.33.1"
"version": {
"owner": "cmaglie",
"repo": "arduino-cli",
"commitish": "862bbe2"
}
},
"arduino-fwuploader": {
"version": "2.2.2"
"version": "2.3.0"
},
"arduino-language-server": {
"version": "0.7.4"
Expand Down
2 changes: 2 additions & 0 deletions arduino-ide-extension/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ function buildFromGit(command, version, destinationPath, taskName) {
shell.echo(`<<< Checked out ${commitish}.`);
}

exec('git', ['-C', tempRepoPath, 'rev-parse', '--short', 'HEAD'], shell);

shell.echo(`>>> Building the ${taskName}...`);
exec(command, ['build'], shell, { cwd: tempRepoPath, encoding: 'utf8' });
shell.echo(`<<< Done ${taskName} build.`);
Expand Down
14 changes: 7 additions & 7 deletions arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import { SketchesServiceClientImpl } from './sketches-service-client-impl';
import { CoreService, CoreServicePath } from '../common/protocol/core-service';
import { BoardsListWidget } from './boards/boards-list-widget';
import { BoardsListWidgetFrontendContribution } from './boards/boards-widget-frontend-contribution';
import { BoardsServiceProvider } from './boards/boards-service-provider';
import {
BoardListDumper,
BoardsServiceProvider,
} from './boards/boards-service-provider';
import { WorkspaceService as TheiaWorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
import { WorkspaceService } from './theia/workspace/workspace-service';
import { OutlineViewContribution as TheiaOutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
Expand Down Expand Up @@ -61,7 +64,6 @@ import {
BoardsConfigDialog,
BoardsConfigDialogProps,
} from './boards/boards-config-dialog';
import { BoardsConfigDialogWidget } from './boards/boards-config-dialog-widget';
import { ScmContribution as TheiaScmContribution } from '@theia/scm/lib/browser/scm-contribution';
import { ScmContribution } from './theia/scm/scm-contribution';
import { SearchInWorkspaceFrontendContribution as TheiaSearchInWorkspaceFrontendContribution } from '@theia/search-in-workspace/lib/browser/search-in-workspace-frontend-contribution';
Expand Down Expand Up @@ -100,7 +102,7 @@ import {
FrontendConnectionStatusService as TheiaFrontendConnectionStatusService,
ApplicationConnectionStatusContribution as TheiaApplicationConnectionStatusContribution,
} from '@theia/core/lib/browser/connection-status-service';
import { BoardsDataMenuUpdater } from './boards/boards-data-menu-updater';
import { BoardsDataMenuUpdater } from './contributions/boards-data-menu-updater';
import { BoardsDataStore } from './boards/boards-data-store';
import { ILogger } from '@theia/core/lib/common/logger';
import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider';
Expand Down Expand Up @@ -445,11 +447,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(BoardsServiceProvider).toSelf().inSingletonScope();
bind(FrontendApplicationContribution).toService(BoardsServiceProvider);
bind(CommandContribution).toService(BoardsServiceProvider);
bind(BoardListDumper).toSelf().inSingletonScope();

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

// Board select dialog
bind(BoardsConfigDialogWidget).toSelf().inSingletonScope();
bind(BoardsConfigDialog).toSelf().inSingletonScope();
bind(BoardsConfigDialogProps).toConstantValue({
title: nls.localize(
Expand Down Expand Up @@ -751,6 +750,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
Contribution.configure(bind, CloudSketchbookContribution);
Contribution.configure(bind, CreateCloudCopy);
Contribution.configure(bind, UpdateArduinoState);
Contribution.configure(bind, BoardsDataMenuUpdater);

bindContributionProvider(bind, StartupTaskProvider);
bind(StartupTaskProvider).toService(BoardsServiceProvider); // to reuse the boards config in another window
Expand Down
Loading

0 comments on commit e684eec

Please sign in to comment.