Skip to content

test: added compiler test to verify IDE2's build path calculation is in sync with the CLI #1823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"build": "tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint",
"watch": "tsc -w",
"test": "mocha \"./lib/test/**/*.test.js\"",
"test:slow": "mocha \"./lib/test/**/*.slow-test.js\"",
"test:watch": "mocha --watch --watch-files lib \"./lib/test/**/*.test.js\""
},
"dependencies": {
Expand Down
10 changes: 10 additions & 0 deletions arduino-ide-extension/src/common/protocol/boards-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ export const BoardsService = Symbol('BoardsService');
export interface BoardsService
extends Installable<BoardsPackage>,
Searchable<BoardsPackage, BoardSearch> {
install(options: {
item: BoardsPackage;
progressId?: string;
version?: Installable.Version;
noOverwrite?: boolean;
/**
* Only for testing to avoid confirmation dialogs from Windows User Access Control when installing a platform.
*/
skipPostInstall?: boolean;
}): Promise<void>;
getState(): Promise<AvailablePorts>;
getBoardDetails(options: { fqbn: string }): Promise<BoardDetails | undefined>;
getBoardPackage(options: { id: string }): Promise<BoardsPackage | undefined>;
Expand Down
4 changes: 4 additions & 0 deletions arduino-ide-extension/src/node/boards-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ export class BoardsServiceImpl
progressId?: string;
version?: Installable.Version;
noOverwrite?: boolean;
skipPostInstall?: boolean;
}): Promise<void> {
const item = options.item;
const version = !!options.version
Expand All @@ -450,6 +451,9 @@ export class BoardsServiceImpl
req.setPlatformPackage(platform);
req.setVersion(version);
req.setNoOverwrite(Boolean(options.noOverwrite));
if (options.skipPostInstall) {
req.setSkipPostInstall(true);
}

console.info('>>> Starting boards package installation...', item);

Expand Down
9 changes: 0 additions & 9 deletions arduino-ide-extension/src/node/core-client-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export class CoreClientProvider {
new Emitter<CoreClientProvider.Client>();
private readonly onClientReady = this.onClientReadyEmitter.event;

private ready = new Deferred<void>();
private pending: Deferred<CoreClientProvider.Client> | undefined;
private _client: CoreClientProvider.Client | undefined;

Expand Down Expand Up @@ -135,14 +134,6 @@ export class CoreClientProvider {
const client = await this.createClient(address);
this.toDisposeOnCloseClient.pushAll([
Disposable.create(() => client.client.close()),
Disposable.create(() => {
this.ready.reject(
new Error(
`Disposed. Creating a new gRPC core client on address ${address}.`
)
);
this.ready = new Deferred();
}),
]);
await this.initInstanceWithFallback(client);
return this.useClient(client);
Expand Down
6 changes: 3 additions & 3 deletions arduino-ide-extension/src/node/sketches-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
SketchContainer,
SketchesError,
} from '../common/protocol/sketches-service';
import { NotificationServiceServerImpl } from './notification-service-server';
import { NotificationServiceServer } from '../common/protocol';
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
import { CoreClientAware } from './core-client-provider';
import {
Expand Down Expand Up @@ -77,8 +77,8 @@ export class SketchesServiceImpl
@inject(ConfigServiceImpl)
private readonly configService: ConfigServiceImpl;

@inject(NotificationServiceServerImpl)
private readonly notificationService: NotificationServiceServerImpl;
@inject(NotificationServiceServer)
private readonly notificationService: NotificationServiceServer;

@inject(EnvVariablesServer)
private readonly envVariableServer: EnvVariablesServer;
Expand Down
Loading