Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 93834a6

Browse files
feat: service installs library dependencies by default (#2830)
1 parent 46f1d7c commit 93834a6

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

‎arduino-ide-extension/src/browser/contributions/first-startup-installer.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export class FirstStartupInstaller extends Contribution {
6161
try {
6262
await this.libraryService.install({
6363
item: builtInLibrary,
64-
installDependencies: true,
6564
noOverwrite: true, // We don't want to automatically replace custom libraries the user might already have in place
6665
installLocation: LibraryLocation.BUILTIN,
6766
});

‎arduino-ide-extension/src/browser/library/library-list-widget.ts‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,23 +167,21 @@ export class LibraryListWidget extends ListWidget<
167167
installDependencies = false;
168168
}
169169

170-
if (typeof installDependencies === 'boolean') {
171-
await this.service.install({
172-
item,
173-
version,
174-
progressId,
175-
installDependencies,
176-
});
177-
this.messageService.info(
178-
nls.localize(
179-
'arduino/library/installedSuccessfully',
180-
'Successfully installed library {0}:{1}',
181-
item.name,
182-
version
183-
),
184-
{ timeout: 3000 }
185-
);
186-
}
170+
await this.service.install({
171+
item,
172+
version,
173+
progressId,
174+
noDeps: !installDependencies,
175+
});
176+
this.messageService.info(
177+
nls.localize(
178+
'arduino/library/installedSuccessfully',
179+
'Successfully installed library {0}:{1}',
180+
item.name,
181+
version
182+
),
183+
{ timeout: 3000 }
184+
);
187185
}
188186

189187
protected override async uninstall({

‎arduino-ide-extension/src/common/protocol/library-service.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface LibraryService
2727
item: LibraryPackage;
2828
progressId?: string;
2929
version?: Installable.Version;
30-
installDependencies?: boolean;
30+
noDeps?: boolean;
3131
noOverwrite?: boolean;
3232
installLocation?: LibraryLocation.BUILTIN | LibraryLocation.USER;
3333
}): Promise<void>;

‎arduino-ide-extension/src/node/library-service-impl.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export class LibraryServiceImpl
306306
item: LibraryPackage;
307307
progressId?: string;
308308
version?: Installable.Version;
309-
installDependencies?: boolean;
309+
noDeps?: boolean;
310310
noOverwrite?: boolean;
311311
installLocation?: LibraryLocation.BUILTIN | LibraryLocation.USER;
312312
}): Promise<void> {
@@ -321,7 +321,7 @@ export class LibraryServiceImpl
321321
req.setInstance(instance);
322322
req.setName(item.name);
323323
req.setVersion(version);
324-
req.setNoDeps(!options.installDependencies);
324+
req.setNoDeps(Boolean(options.noDeps));
325325
req.setNoOverwrite(Boolean(options.noOverwrite));
326326
if (options.installLocation === LibraryLocation.BUILTIN) {
327327
req.setInstallLocation(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /