File tree 7 files changed +12
-27
lines changed
7 files changed +12
-27
lines changed Original file line number Diff line number Diff line change 169
169
],
170
170
"arduino" : {
171
171
"arduino-cli" : {
172
- "version" : " 0.35.2 "
172
+ "version" : " 0.35.3 "
173
173
},
174
174
"arduino-fwuploader" : {
175
175
"version" : " 2.4.1"
Original file line number Diff line number Diff line change @@ -398,12 +398,9 @@ export async function isDebugEnabled(
398
398
`Failed to append boards config to the FQBN. Original FQBN was: ${ fqbn } `
399
399
) ;
400
400
}
401
- if ( ! data . selectedProgrammer ) {
402
- throw new Error ( noProgrammerSelectedFor ( board . name ) ) ;
403
- }
404
401
const params = {
405
402
fqbn : fqbnWithConfig ,
406
- programmer : data . selectedProgrammer . id ,
403
+ programmer : data . selectedProgrammer ? .id ,
407
404
} ;
408
405
try {
409
406
const debugFqbn = await checkDebugEnabled ( params ) ;
@@ -443,13 +440,3 @@ export function debuggingNotSupported(boardName: string): string {
443
440
boardName
444
441
) ;
445
442
}
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
- }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export interface CheckDebugEnabledParams {
95
95
* The FQBN might contain custom board config options. For example, `arduino:esp32:nano_nora:USBMode=hwcdc,option2=value2`.
96
96
*/
97
97
readonly fqbn : string ;
98
- readonly programmer : string ;
98
+ readonly programmer ? : string ;
99
99
}
100
100
101
101
export interface BoardSearch extends Searchable . Options {
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class BoardsServiceImpl
178
178
const req = new IsDebugSupportedRequest ( )
179
179
. setInstance ( instance )
180
180
. setFqbn ( fqbn )
181
- . setProgrammer ( programmer ) ;
181
+ . setProgrammer ( programmer ?? '' ) ;
182
182
try {
183
183
const debugFqbn = await new Promise < string > ( ( resolve , reject ) =>
184
184
client . isDebugSupported ( req , ( err , resp ) => {
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import {
28
28
debuggingNotSupported ,
29
29
isDebugEnabled ,
30
30
noPlatformInstalledFor ,
31
- noProgrammerSelectedFor ,
32
31
} from '../../browser/contributions/debug' ;
33
32
import { NotificationCenter } from '../../browser/notification-center' ;
34
33
import { noBoardSelected } from '../../common/nls' ;
@@ -117,20 +116,20 @@ describe('debug', () => {
117
116
) ;
118
117
} ) ;
119
118
120
- it ( 'should error when no programmer selected' , async ( ) => {
119
+ it ( 'should resolve when no programmer is selected (arduino/arduino-cli#2540) ' , async ( ) => {
121
120
const copyData : Mutable < BoardsDataStore . Data > = deepClone ( data ) ;
122
121
delete copyData . selectedProgrammer ;
123
- await rejects (
122
+ await doesNotReject (
124
123
isDebugEnabled (
125
124
board ,
126
125
( ) => boardDetails ,
127
126
( ) => copyData ,
128
127
( 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
+ )
134
133
) ;
135
134
} ) ;
136
135
Original file line number Diff line number Diff line change 196
196
"theiaPlugins" : {
197
197
"vscode-builtin-cpp" : " https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix" ,
198
198
"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" ,
200
200
"vscode-builtin-json" : " https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix" ,
201
201
"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" ,
202
202
"cortex-debug" : " https://downloads.arduino.cc/marus25.cortex-debug/marus25.cortex-debug-1.5.1.vsix" ,
Original file line number Diff line number Diff line change 213
213
"debuggingNotSupported" : " Debugging is not supported by '{0}'" ,
214
214
"getDebugInfo" : " Getting debug info..." ,
215
215
"noPlatformInstalledFor" : " Platform is not installed for '{0}'" ,
216
- "noProgrammerSelectedFor" : " No programmer selected for '{0}'" ,
217
216
"optimizeForDebugging" : " Optimize for Debugging" ,
218
217
"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?"
219
218
},
You can’t perform that action at this time.
0 commit comments