Skip to content
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

feat: use Arduino CLI 1.0.4 #2457

Merged
merged 5 commits into from
Sep 6, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ jobs:
- build-type-determination
- select-targets
env:
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
# Location of artifacts generated by build.
BUILD_ARTIFACTS_PATH: electron-app/dist/build-artifacts
# to skip passing signing credentials to electron-builder
Expand Down
6 changes: 3 additions & 3 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
},
"optionalDependencies": {
"grpc-tools": "^1.12.4",
"protoc": "^1.0.4"
"@pingghost/protoc": "^1.0.2"
},
"mocha": {
"require": [
Expand Down Expand Up @@ -170,7 +170,7 @@
],
"arduino": {
"arduino-cli": {
"version": "0.36.0-rc.1"
"version": "1.0.4"
},
"arduino-fwuploader": {
"version": "2.4.1"
Expand All @@ -179,7 +179,7 @@
"version": {
"owner": "arduino",
"repo": "arduino-language-server",
"commitish": "91c2ba8"
"commitish": "05ec308"
}
},
"clangd": {
Expand Down
5 changes: 3 additions & 2 deletions arduino-ide-extension/scripts/generate-protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
const { exec } = require('./utils');
const glob = require('glob');
const { SemVer, gte, valid: validSemVer } = require('semver');
const protoc = path.dirname(require('protoc/protoc'));

// Use a node-protoc fork until apple arm32 is supported
// https://github.com/YePpHa/node-protoc/pull/10
const protoc = path.dirname(require('@pingghost/protoc/protoc'));
const repository = await fs.mkdtemp(path.join(os.tmpdir(), 'arduino-cli-'));

const { owner, repo, commitish } = (() => {
Expand Down
4 changes: 2 additions & 2 deletions arduino-ide-extension/src/node/boards-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ function createBoardsPackage(
if (!actualRelease) {
return undefined;
}
const { name, typeList, boardsList, deprecated, compatible } = actualRelease;
const { name, typesList, boardsList, deprecated, compatible } = actualRelease;
if (!compatible) {
return undefined; // never show incompatible platforms
}
Expand All @@ -602,7 +602,7 @@ function createBoardsPackage(
),
description: boardsList.map(({ name }) => name).join(', '),
boards: boardsList,
types: typeList,
types: typesList,
moreInfoLink: website,
author: maintainer,
deprecated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ export class BoardListResponse extends jspb.Message {
getPortsList(): Array<DetectedPort>;
setPortsList(value: Array<DetectedPort>): BoardListResponse;
addPorts(value?: DetectedPort, index?: number): DetectedPort;
clearWarningsList(): void;
getWarningsList(): Array<string>;
setWarningsList(value: Array<string>): BoardListResponse;
addWarnings(value: string, index?: number): string;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BoardListResponse.AsObject;
Expand All @@ -398,6 +402,7 @@ export class BoardListResponse extends jspb.Message {
export namespace BoardListResponse {
export type AsObject = {
portsList: Array<DetectedPort.AsObject>,
warningsList: Array<string>,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3387,7 +3387,7 @@ proto.cc.arduino.cli.commands.v1.BoardListRequest.prototype.setFqbn = function(v
* @private {!Array<number>}
* @const
*/
proto.cc.arduino.cli.commands.v1.BoardListResponse.repeatedFields_ = [1];
proto.cc.arduino.cli.commands.v1.BoardListResponse.repeatedFields_ = [1,2];



Expand Down Expand Up @@ -3421,7 +3421,8 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.toObject = function
proto.cc.arduino.cli.commands.v1.BoardListResponse.toObject = function(includeInstance, msg) {
var f, obj = {
portsList: jspb.Message.toObjectList(msg.getPortsList(),
proto.cc.arduino.cli.commands.v1.DetectedPort.toObject, includeInstance)
proto.cc.arduino.cli.commands.v1.DetectedPort.toObject, includeInstance),
warningsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
};

if (includeInstance) {
Expand Down Expand Up @@ -3463,6 +3464,10 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.deserializeBinaryFromReader =
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.DetectedPort.deserializeBinaryFromReader);
msg.addPorts(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addWarnings(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -3500,6 +3505,13 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.serializeBinaryToWriter = fun
proto.cc.arduino.cli.commands.v1.DetectedPort.serializeBinaryToWriter
);
}
f = message.getWarningsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
};


Expand Down Expand Up @@ -3541,6 +3553,43 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.clearPortsList = fu
};


/**
* repeated string warnings = 2;
* @return {!Array<string>}
*/
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.getWarningsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};


/**
* @param {!Array<string>} value
* @return {!proto.cc.arduino.cli.commands.v1.BoardListResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.setWarningsList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};


/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.BoardListResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.addWarnings = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};


/**
* Clears the list making it empty but non-null.
* @return {!proto.cc.arduino.cli.commands.v1.BoardListResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.clearWarningsList = function() {
return this.setWarningsList([]);
};



/**
* List of repeated fields within this message type.
Expand Down
Loading
Loading