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 b630729

Browse files
author
Akos Kitta
committed
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 8fe6a81 commit b630729

File tree

7 files changed

+12
-27
lines changed

7 files changed

+12
-27
lines changed

‎arduino-ide-extension/package.json‎

Lines 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‎

Lines 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‎

Lines 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‎

Lines 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‎

Lines 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-
reasoninstanceofError&&
133-
reason.message===noProgrammerSelectedFor(board.name)
128+
async(params)=>{
129+
expect(params.programmer).to.be.undefined;
130+
returnparams.fqbn;
131+
}
132+
)
134133
);
135134
});
136135

‎electron-app/package.json‎

Lines 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‎

Lines 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)

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