Skip to content

#374: ensure compile verbose pref is included on upload #1237

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 2 commits into from
Jul 26, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,10 @@ export class UploadSketch extends CoreServiceContribution {
fqbn,
{ selectedProgrammer },
verify,
verbose,
uploadVerbose,
sourceOverride,
optimizeForDebug,
compileVerbose,
] = await Promise.all([
this.boardsDataStore.appendConfigToFqbn(
boardsConfig.selectedBoard?.fqbn
Expand All @@ -228,8 +229,10 @@ export class UploadSketch extends CoreServiceContribution {
this.commandService.executeCommand<boolean>(
'arduino-is-optimize-for-debug'
),
this.preferences.get('arduino.compile.verbose'),
]);

const verbose = { compile: compileVerbose, upload: uploadVerbose };
const board = {
...boardsConfig.selectedBoard,
name: boardsConfig.selectedBoard?.name || '',
Expand Down
3 changes: 2 additions & 1 deletion arduino-ide-extension/src/common/protocol/core-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ export namespace CoreService {
}

export namespace Upload {
export interface Options extends Compile.Options {
export interface Options extends Omit<Compile.Options, 'verbose'> {
readonly port?: Port;
readonly programmer?: Programmer | undefined;
readonly verify: boolean;
readonly userFields: BoardUserField[];
readonly verbose: { compile: boolean; upload: boolean };
}
}

Expand Down
8 changes: 6 additions & 2 deletions arduino-ide-extension/src/node/core-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
) => ApplicationError<number, CoreError.ErrorLocation[]>,
task: string
): Promise<void> {
await this.compile(Object.assign(options, { exportBinaries: false }));
await this.compile({
...options,
verbose: options.verbose.compile,
exportBinaries: false,
});

const coreClient = await this.coreClient;
const { client, instance } = coreClient;
Expand Down Expand Up @@ -262,7 +266,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
if (programmer) {
request.setProgrammer(programmer.id);
}
request.setVerbose(options.verbose);
request.setVerbose(options.verbose.upload);
request.setVerify(options.verify);

options.userFields.forEach((e) => {
Expand Down