Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino/arduino-ide
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: arduino/arduino-ide
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: light-version-poc
Choose a head ref
  • 2 commits
  • 12 files changed
  • 2 contributors

Commits on Jan 30, 2025

  1. Test light version

    giacomocusinato committed Jan 30, 2025
    Copy the full SHA
    8ec96fc View commit details

Commits on Mar 12, 2025

  1. Added timeout to yarn install

    csarnataro authored and giacomocusinato committed Mar 12, 2025
    Copy the full SHA
    0b41378 View commit details
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@ import { ArduinoMenus } from './menu/arduino-menus';
import { MonitorViewContribution } from './serial/monitor/monitor-view-contribution';
import { SerialPlotterContribution } from './serial/plotter/plotter-frontend-contribution';
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';

@injectable()
export class ArduinoFrontendContribution
@@ -103,6 +104,12 @@ export class ArduinoFrontendContribution
}

registerToolbarItems(registry: TabBarToolbarRegistry): void {
const config = FrontendApplicationConfigProvider.get();

debugger;
if (config.isLightVersion) {
return;
}
registry.registerItem({
id: BoardsToolBarItem.TOOLBAR_ID,
render: () => (
18 changes: 7 additions & 11 deletions arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
Original file line number Diff line number Diff line change
@@ -85,7 +85,6 @@ import { TabBarDecoratorService as TheiaTabBarDecoratorService } from '@theia/co
import { TabBarDecoratorService } from './theia/core/tab-bar-decorator';
import { ProblemManager as TheiaProblemManager } from '@theia/markers/lib/browser';
import { ProblemManager } from './theia/markers/problem-manager';
import { BoardsAutoInstaller } from './boards/boards-auto-installer';
import { ShellLayoutRestorer } from './theia/core/shell-layout-restorer';
import {
ArduinoComponentContextMenuRenderer,
@@ -222,9 +221,6 @@ import { NotificationsRenderer as TheiaNotificationsRenderer } from '@theia/mess
import { NotificationsRenderer } from './theia/messages/notifications-renderer';
import { SketchbookWidgetContribution } from './widgets/sketchbook/sketchbook-widget-contribution';
import { LocalCacheFsProvider } from './local-cache/local-cache-fs-provider';
import { CloudSketchbookWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-widget';
import { CloudSketchbookTreeWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-tree-widget';
import { createCloudSketchbookTreeWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-tree-container';
import { CreateApi } from './create/create-api';
import { ShareSketchDialog } from './dialogs/cloud-share-sketch-dialog';
import { AuthenticationClientService } from './auth/authentication-client-service';
@@ -497,8 +493,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
.whenTargetNamed('store');

// Boards auto-installer
bind(BoardsAutoInstaller).toSelf().inSingletonScope();
bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
// bind(BoardsAutoInstaller).toSelf().inSingletonScope();
// bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);

// Boards list widget
bind(BoardsListWidget).toSelf();
@@ -970,11 +966,11 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
createWidget: () => ctx.container.get(SketchbookCompositeWidget),
}));

bind(CloudSketchbookWidget).toSelf();
rebind(SketchbookWidget).toService(CloudSketchbookWidget);
bind(CloudSketchbookTreeWidget).toDynamicValue(({ container }) =>
createCloudSketchbookTreeWidget(container)
);
// bind(CloudSketchbookWidget).toSelf();
// rebind(SketchbookWidget).toService(CloudSketchbookWidget);
// bind(CloudSketchbookTreeWidget).toDynamicValue(({ container }) =>
// createCloudSketchbookTreeWidget(container)
// );
bind(CreateApi).toSelf().inSingletonScope();
bind(SketchCache).toSelf().inSingletonScope();
bind(CreateFeatures).toSelf().inSingletonScope();
Original file line number Diff line number Diff line change
@@ -52,6 +52,10 @@ export class BoardsAutoInstaller implements FrontendApplicationContribution {
private readonly toDispose = new DisposableCollection();

onStart(): void {
if (process.env.IS_LIGHT_VERSION) {
return;
}

this.toDispose.pushAll([
this.boardsServiceProvider.onBoardsConfigDidChange((event) => {
if (isBoardIdentifierChangeEvent(event)) {
Original file line number Diff line number Diff line change
@@ -35,6 +35,10 @@ export class BoardsDataMenuUpdater extends Contribution {
private readonly toDisposeOnBoardChange = new DisposableCollection();

override onStart(): void {
if (process.env.IS_LIGHT_VERSION) {
return;
}

this.boardsDataStore.onDidChange(() =>
this.updateMenuActions(
this.boardsServiceProvider.boardsConfig.selectedBoard
Original file line number Diff line number Diff line change
@@ -47,6 +47,10 @@ export class CheckForIDEUpdates extends Contribution {
}

override async onReady(): Promise<void> {
if (process.env.IS_LIGHT_VERSION) {
return;
}

this.updater
.init(
this.preferences.get('arduino.ide.updateChannel'),
Original file line number Diff line number Diff line change
@@ -16,6 +16,10 @@ export class IndexesUpdateProgress extends Contribution {
| undefined;

override onStart(): void {
if (process.env.IS_LIGHT_VERSION) {
return;
}

this.notificationCenter.onIndexUpdateWillStart(({ progressId }) =>
this.getOrCreateProgress(progressId)
);
Original file line number Diff line number Diff line change
@@ -113,6 +113,10 @@ export class InoLanguage extends SketchContribution {
private languageServerFqbn?: string;

override onReady(): void {
if (process.env.IS_LIGHT_VERSION) {
return;
}

const start = (
selectedBoard: BoardIdentifier | undefined,
forceStart = false
@@ -191,6 +195,10 @@ export class InoLanguage extends SketchContribution {
name: string | undefined,
forceStart = false
): Promise<void> {
if (process.env.IS_LIGHT_VERSION) {
return;
}

const port = await this.daemon.tryGetPort();
if (typeof port !== 'number') {
return;
12 changes: 12 additions & 0 deletions arduino-ide-extension/src/browser/contributions/update-indexes.ts
Original file line number Diff line number Diff line change
@@ -45,6 +45,10 @@ export class UpdateIndexes extends Contribution {
}

private async checkForUpdates(): Promise<void> {
if (process.env.IS_LIGHT_VERSION) {
return;
}

const checkForUpdates = this.preferences['arduino.checkForUpdates'];
if (!checkForUpdates) {
console.debug(
@@ -83,6 +87,10 @@ export class UpdateIndexes extends Contribution {
types: IndexType[],
force = false
): Promise<void> {
if (process.env.IS_LIGHT_VERSION) {
return;
}

const updatedAt = new Date().toISOString();
return Promise.all(
types.map((type) => this.needsIndexUpdate(type, updatedAt, force))
@@ -104,6 +112,10 @@ export class UpdateIndexes extends Contribution {
now: string,
force = false
): Promise<IndexType | false> {
if (process.env.IS_LIGHT_VERSION) {
return false;
}

if (force) {
console.debug(
`[update-indexes]: Update for index type: '${type}' was forcefully requested.`
Original file line number Diff line number Diff line change
@@ -521,6 +521,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
}

protected override async startBackend(): Promise<number> {
// FIXME: temporary test to check improvements on low powered machines.
process.env.IS_LIGHT_VERSION = 'true';
// Check if we should run everything as one process.
const noBackendFork = process.argv.indexOf('--no-cluster') !== -1;
// We cannot use the `process.cwd()` as the application project path (the location of the `package.json` in other words)
45 changes: 20 additions & 25 deletions arduino-ide-extension/src/node/arduino-ide-backend-module.ts
Original file line number Diff line number Diff line change
@@ -75,12 +75,7 @@ import {
} from '../common/protocol';
import { BackendApplication } from './theia/core/backend-application';
import { BoardDiscovery } from './board-discovery';
import { AuthenticationServiceImpl } from './auth/authentication-service-impl';
import {
AuthenticationService,
AuthenticationServiceClient,
AuthenticationServicePath,
} from '../common/protocol/authentication-service';

import { ArduinoFirmwareUploaderImpl } from './arduino-firmware-uploader-impl';
import { PlotterBackendContribution } from './plotter/plotter-backend-contribution';
import { ArduinoLocalizationContribution } from './i18n/arduino-localization-contribution';
@@ -354,25 +349,25 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
].forEach((name) => bindChildLogger(bind, name));

// Cloud sketchbook bindings
bind(AuthenticationServiceImpl).toSelf().inSingletonScope();
bind(AuthenticationService).toService(AuthenticationServiceImpl);
bind(BackendApplicationContribution).toService(AuthenticationServiceImpl);
bind(ConnectionHandler)
.toDynamicValue(
(context) =>
new JsonRpcConnectionHandler<AuthenticationServiceClient>(
AuthenticationServicePath,
(client) => {
const server = context.container.get<AuthenticationServiceImpl>(
AuthenticationServiceImpl
);
server.setClient(client);
client.onDidCloseConnection(() => server.disposeClient(client));
return server;
}
)
)
.inSingletonScope();
// bind(AuthenticationServiceImpl).toSelf().inSingletonScope();
// bind(AuthenticationService).toService(AuthenticationServiceImpl);
// bind(BackendApplicationContribution).toService(AuthenticationServiceImpl);
// bind(ConnectionHandler)
// .toDynamicValue(
// (context) =>
// new JsonRpcConnectionHandler<AuthenticationServiceClient>(
// AuthenticationServicePath,
// (client) => {
// const server = context.container.get<AuthenticationServiceImpl>(
// AuthenticationServiceImpl
// );
// server.setClient(client);
// client.onDidCloseConnection(() => server.disposeClient(client));
// return server;
// }
// )
// )
// .inSingletonScope();

bind(PlotterBackendContribution).toSelf().inSingletonScope();
bind(BackendApplicationContribution).toService(PlotterBackendContribution);
4 changes: 4 additions & 0 deletions arduino-ide-extension/src/node/board-discovery.ts
Original file line number Diff line number Diff line change
@@ -170,6 +170,10 @@ export class BoardDiscovery
}

async start(): Promise<void> {
if (process.env.IS_LIGHT_VERSION) {
return;
}

this.logger.info('start');
if (this.stopping) {
this.logger.info('start is stopping wait');
5 changes: 1 addition & 4 deletions scripts/package.sh
Original file line number Diff line number Diff line change
@@ -2,11 +2,8 @@

set -e

yarn install --immutable \
yarn install --immutable --network-timeout 10000000 \
&& yarn --cwd arduino-ide-extension build \
&& yarn test \
&& yarn --cwd arduino-ide-extension test:slow \
&& yarn --cwd arduino-ide-extension lint \
&& yarn --cwd electron-app rebuild \
&& yarn --cwd electron-app build \
&& yarn --cwd electron-app package