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

Appearance settings

Commit 4a807ab

Browse filesBrowse files
Akos Kittakittaakos
authored andcommitted
fix: no required programmer for debug --info
Ref: arduino/arduino-cli#2540 Closes: #2368 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 1a98485 commit 4a807ab
Copy full SHA for 4a807ab

File tree

Expand file treeCollapse file tree

7 files changed

+12
-27
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+12
-27
lines changed

‎arduino-ide-extension/package.json

Copy file name to clipboardExpand all lines: arduino-ide-extension/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
],
170170
"arduino": {
171171
"arduino-cli": {
172-
"version": "0.35.2"
172+
"version": "0.35.3"
173173
},
174174
"arduino-fwuploader": {
175175
"version": "2.4.1"

‎arduino-ide-extension/src/browser/contributions/debug.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/contributions/debug.ts
+1-14Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,9 @@ export async function isDebugEnabled(
398398
`Failed to append boards config to the FQBN. Original FQBN was: ${fqbn}`
399399
);
400400
}
401-
if (!data.selectedProgrammer) {
402-
throw new Error(noProgrammerSelectedFor(board.name));
403-
}
404401
const params = {
405402
fqbn: fqbnWithConfig,
406-
programmer: data.selectedProgrammer.id,
403+
programmer: data.selectedProgrammer?.id,
407404
};
408405
try {
409406
const debugFqbn = await checkDebugEnabled(params);
@@ -443,13 +440,3 @@ export function debuggingNotSupported(boardName: string): string {
443440
boardName
444441
);
445442
}
446-
/**
447-
* (non-API)
448-
*/
449-
export function noProgrammerSelectedFor(boardName: string): string {
450-
return nls.localize(
451-
'arduino/debug/noProgrammerSelectedFor',
452-
"No programmer selected for '{0}'",
453-
boardName
454-
);
455-
}

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

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/common/protocol/boards-service.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export interface CheckDebugEnabledParams {
9595
* The FQBN might contain custom board config options. For example, `arduino:esp32:nano_nora:USBMode=hwcdc,option2=value2`.
9696
*/
9797
readonly fqbn: string;
98-
readonly programmer: string;
98+
readonly programmer?: string;
9999
}
100100

101101
export interface BoardSearch extends Searchable.Options {

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

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/node/boards-service-impl.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export class BoardsServiceImpl
178178
const req = new IsDebugSupportedRequest()
179179
.setInstance(instance)
180180
.setFqbn(fqbn)
181-
.setProgrammer(programmer);
181+
.setProgrammer(programmer ?? '');
182182
try {
183183
const debugFqbn = await new Promise<string>((resolve, reject) =>
184184
client.isDebugSupported(req, (err, resp) => {

‎arduino-ide-extension/src/test/browser/debug.test.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/test/browser/debug.test.ts
+7-8Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
debuggingNotSupported,
2929
isDebugEnabled,
3030
noPlatformInstalledFor,
31-
noProgrammerSelectedFor,
3231
} from '../../browser/contributions/debug';
3332
import { NotificationCenter } from '../../browser/notification-center';
3433
import { noBoardSelected } from '../../common/nls';
@@ -117,20 +116,20 @@ describe('debug', () => {
117116
);
118117
});
119118

120-
it('should error when no programmer selected', async () => {
119+
it('should resolve when no programmer is selected (arduino/arduino-cli#2540)', async () => {
121120
const copyData: Mutable<BoardsDataStore.Data> = deepClone(data);
122121
delete copyData.selectedProgrammer;
123-
await rejects(
122+
await doesNotReject(
124123
isDebugEnabled(
125124
board,
126125
() => boardDetails,
127126
() => copyData,
128127
(fqbn) => fqbn,
129-
unexpectedCall()
130-
),
131-
(reason) =>
132-
reason instanceof Error &&
133-
reason.message === noProgrammerSelectedFor(board.name)
128+
async (params) => {
129+
expect(params.programmer).to.be.undefined;
130+
return params.fqbn;
131+
}
132+
)
134133
);
135134
});
136135

‎electron-app/package.json

Copy file name to clipboardExpand all lines: electron-app/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
"theiaPlugins": {
197197
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix",
198198
"vscode-arduino-api": "https://github.com/dankeboy36/vscode-arduino-api/releases/download/0.1.2/vscode-arduino-api-0.1.2.vsix",
199-
"vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.2.vsix",
199+
"vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.3.vsix",
200200
"vscode-builtin-json": "https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix",
201201
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
202202
"cortex-debug": "https://downloads.arduino.cc/marus25.cortex-debug/marus25.cortex-debug-1.5.1.vsix",

‎i18n/en.json

Copy file name to clipboardExpand all lines: i18n/en.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@
213213
"debuggingNotSupported": "Debugging is not supported by '{0}'",
214214
"getDebugInfo": "Getting debug info...",
215215
"noPlatformInstalledFor": "Platform is not installed for '{0}'",
216-
"noProgrammerSelectedFor": "No programmer selected for '{0}'",
217216
"optimizeForDebugging": "Optimize for Debugging",
218217
"sketchIsNotCompiled": "Sketch '{0}' must be verified before starting a debug session. Please verify the sketch and start debugging again. Do you want to verify the sketch now?"
219218
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.