Skip to content

Commit 9373a0b

Browse files
davegarthsimpsonAkos Kitta
and
Akos Kitta
authored
arduino#374: ensure compile verbose pref is included on upload (arduino#1237)
* ensure compile verbose pref is included on upload * better verbose typings Signed-off-by: Akos Kitta <[email protected]> Co-authored-by: Akos Kitta <[email protected]>
1 parent 5087ff0 commit 9373a0b

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

arduino-ide-extension/src/browser/contributions/upload-sketch.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,10 @@ export class UploadSketch extends CoreServiceContribution {
214214
fqbn,
215215
{ selectedProgrammer },
216216
verify,
217-
verbose,
217+
uploadVerbose,
218218
sourceOverride,
219219
optimizeForDebug,
220+
compileVerbose,
220221
] = await Promise.all([
221222
this.boardsDataStore.appendConfigToFqbn(
222223
boardsConfig.selectedBoard?.fqbn
@@ -228,8 +229,10 @@ export class UploadSketch extends CoreServiceContribution {
228229
this.commandService.executeCommand<boolean>(
229230
'arduino-is-optimize-for-debug'
230231
),
232+
this.preferences.get('arduino.compile.verbose'),
231233
]);
232234

235+
const verbose = { compile: compileVerbose, upload: uploadVerbose };
233236
const board = {
234237
...boardsConfig.selectedBoard,
235238
name: boardsConfig.selectedBoard?.name || '',

arduino-ide-extension/src/common/protocol/core-service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ export namespace CoreService {
8484
}
8585

8686
export namespace Upload {
87-
export interface Options extends Compile.Options {
87+
export interface Options extends Omit<Compile.Options, 'verbose'> {
8888
readonly port?: Port;
8989
readonly programmer?: Programmer | undefined;
9090
readonly verify: boolean;
9191
readonly userFields: BoardUserField[];
92+
readonly verbose: { compile: boolean; upload: boolean };
9293
}
9394
}
9495

arduino-ide-extension/src/node/core-service-impl.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
200200
) => ApplicationError<number, CoreError.ErrorLocation[]>,
201201
task: string
202202
): Promise<void> {
203-
await this.compile(Object.assign(options, { exportBinaries: false }));
203+
await this.compile({
204+
...options,
205+
verbose: options.verbose.compile,
206+
exportBinaries: false,
207+
});
204208

205209
const coreClient = await this.coreClient;
206210
const { client, instance } = coreClient;
@@ -262,7 +266,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
262266
if (programmer) {
263267
request.setProgrammer(programmer.id);
264268
}
265-
request.setVerbose(options.verbose);
269+
request.setVerbose(options.verbose.upload);
266270
request.setVerify(options.verify);
267271

268272
options.userFields.forEach((e) => {

0 commit comments

Comments
 (0)