diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eecd06d47..54cdcdbbd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ on: env: # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml - GO_VERSION: '1.19' + GO_VERSION: '1.21' # See: https://github.com/actions/setup-node/#readme NODE_VERSION: '18.17' JOB_TRANSFER_ARTIFACT: build-artifacts diff --git a/.github/workflows/check-i18n-task.yml b/.github/workflows/check-i18n-task.yml index ec80cad86..22426313a 100644 --- a/.github/workflows/check-i18n-task.yml +++ b/.github/workflows/check-i18n-task.yml @@ -2,7 +2,7 @@ name: Check Internationalization env: # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml - GO_VERSION: '1.19' + GO_VERSION: '1.21' # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows on: diff --git a/.github/workflows/i18n-nightly-push.yml b/.github/workflows/i18n-nightly-push.yml index 92e8b6eb0..6f401a526 100644 --- a/.github/workflows/i18n-nightly-push.yml +++ b/.github/workflows/i18n-nightly-push.yml @@ -2,7 +2,7 @@ name: i18n-nightly-push env: # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml - GO_VERSION: '1.19' + GO_VERSION: '1.21' on: schedule: diff --git a/.github/workflows/i18n-weekly-pull.yml b/.github/workflows/i18n-weekly-pull.yml index 7f4c5d293..88157a7fa 100644 --- a/.github/workflows/i18n-weekly-pull.yml +++ b/.github/workflows/i18n-weekly-pull.yml @@ -2,7 +2,7 @@ name: i18n-weekly-pull env: # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml - GO_VERSION: '1.19' + GO_VERSION: '1.21' on: schedule: diff --git a/.github/workflows/themes-weekly-pull.yml b/.github/workflows/themes-weekly-pull.yml index f9fcb446a..bd9f845c1 100644 --- a/.github/workflows/themes-weekly-pull.yml +++ b/.github/workflows/themes-weekly-pull.yml @@ -8,7 +8,7 @@ on: env: # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml - GO_VERSION: '1.19' + GO_VERSION: '1.21' NODE_VERSION: '18.17' jobs: diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 3614fb73a..d6e033829 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -169,7 +169,7 @@ ], "arduino": { "arduino-cli": { - "version": "0.35.2" + "version": "0.35.3" }, "arduino-fwuploader": { "version": "2.4.1" diff --git a/arduino-ide-extension/src/browser/contributions/debug.ts b/arduino-ide-extension/src/browser/contributions/debug.ts index cc49b3809..e94755c46 100644 --- a/arduino-ide-extension/src/browser/contributions/debug.ts +++ b/arduino-ide-extension/src/browser/contributions/debug.ts @@ -398,12 +398,9 @@ export async function isDebugEnabled( `Failed to append boards config to the FQBN. Original FQBN was: ${fqbn}` ); } - if (!data.selectedProgrammer) { - throw new Error(noProgrammerSelectedFor(board.name)); - } const params = { fqbn: fqbnWithConfig, - programmer: data.selectedProgrammer.id, + programmer: data.selectedProgrammer?.id, }; try { const debugFqbn = await checkDebugEnabled(params); @@ -443,13 +440,3 @@ export function debuggingNotSupported(boardName: string): string { boardName ); } -/** - * (non-API) - */ -export function noProgrammerSelectedFor(boardName: string): string { - return nls.localize( - 'arduino/debug/noProgrammerSelectedFor', - "No programmer selected for '{0}'", - boardName - ); -} diff --git a/arduino-ide-extension/src/common/protocol/boards-service.ts b/arduino-ide-extension/src/common/protocol/boards-service.ts index a06dffd33..ba1b9f575 100644 --- a/arduino-ide-extension/src/common/protocol/boards-service.ts +++ b/arduino-ide-extension/src/common/protocol/boards-service.ts @@ -95,7 +95,7 @@ export interface CheckDebugEnabledParams { * The FQBN might contain custom board config options. For example, `arduino:esp32:nano_nora:USBMode=hwcdc,option2=value2`. */ readonly fqbn: string; - readonly programmer: string; + readonly programmer?: string; } export interface BoardSearch extends Searchable.Options { diff --git a/arduino-ide-extension/src/node/boards-service-impl.ts b/arduino-ide-extension/src/node/boards-service-impl.ts index 3b04b18eb..0d1926f9c 100644 --- a/arduino-ide-extension/src/node/boards-service-impl.ts +++ b/arduino-ide-extension/src/node/boards-service-impl.ts @@ -178,7 +178,7 @@ export class BoardsServiceImpl const req = new IsDebugSupportedRequest() .setInstance(instance) .setFqbn(fqbn) - .setProgrammer(programmer); + .setProgrammer(programmer ?? ''); try { const debugFqbn = await new Promise((resolve, reject) => client.isDebugSupported(req, (err, resp) => { diff --git a/arduino-ide-extension/src/test/browser/debug.test.ts b/arduino-ide-extension/src/test/browser/debug.test.ts index 0f41bad5c..e66cd65a0 100644 --- a/arduino-ide-extension/src/test/browser/debug.test.ts +++ b/arduino-ide-extension/src/test/browser/debug.test.ts @@ -28,7 +28,6 @@ import { debuggingNotSupported, isDebugEnabled, noPlatformInstalledFor, - noProgrammerSelectedFor, } from '../../browser/contributions/debug'; import { NotificationCenter } from '../../browser/notification-center'; import { noBoardSelected } from '../../common/nls'; @@ -117,20 +116,20 @@ describe('debug', () => { ); }); - it('should error when no programmer selected', async () => { + it('should resolve when no programmer is selected (arduino/arduino-cli#2540)', async () => { const copyData: Mutable = deepClone(data); delete copyData.selectedProgrammer; - await rejects( + await doesNotReject( isDebugEnabled( board, () => boardDetails, () => copyData, (fqbn) => fqbn, - unexpectedCall() - ), - (reason) => - reason instanceof Error && - reason.message === noProgrammerSelectedFor(board.name) + async (params) => { + expect(params.programmer).to.be.undefined; + return params.fqbn; + } + ) ); }); diff --git a/electron-app/package.json b/electron-app/package.json index b90c44b8f..6453e4817 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -196,7 +196,7 @@ "theiaPlugins": { "vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix", "vscode-arduino-api": "https://github.com/dankeboy36/vscode-arduino-api/releases/download/0.1.2/vscode-arduino-api-0.1.2.vsix", - "vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.2.vsix", + "vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.3.vsix", "vscode-builtin-json": "https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix", "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", "cortex-debug": "https://downloads.arduino.cc/marus25.cortex-debug/marus25.cortex-debug-1.5.1.vsix", diff --git a/i18n/en.json b/i18n/en.json index 841ab3a91..234781e58 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -213,7 +213,6 @@ "debuggingNotSupported": "Debugging is not supported by '{0}'", "getDebugInfo": "Getting debug info...", "noPlatformInstalledFor": "Platform is not installed for '{0}'", - "noProgrammerSelectedFor": "No programmer selected for '{0}'", "optimizeForDebugging": "Optimize for Debugging", "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?" },