Skip to content

Commit 0b89cc4

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
Updated to the HEAD CLI.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent 284181b commit 0b89cc4

File tree

4 files changed

+79
-3
lines changed

4 files changed

+79
-3
lines changed

arduino-ide-extension/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@
120120
],
121121
"arduino": {
122122
"cli": {
123-
"version": "0.14.0"
123+
"version": {
124+
"owner": "arduino",
125+
"repo": "arduino-cli"
126+
}
124127
}
125128
}
126129
}

arduino-ide-extension/scripts/generate-protocol.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
shell.exit(1);
7373
}
7474
const version = JSON.parse(jsonVersion).VersionString;
75-
if (version) {
75+
if (version && version !== '0.0.0-git') { // 0.0.0-git is the version of the CLI when built manually and not downloaded as a releases/nightly.
7676
shell.echo(`>>> Checking out version: ${version}...`);
7777
if (shell.exec(`git -C ${repository} checkout ${version} -b ${version}`).code !== 0) {
7878
shell.exit(1);

arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ export class CompileReq extends jspb.Message {
7070
getExportBinaries(): boolean;
7171
setExportBinaries(value: boolean): CompileReq;
7272

73+
getCreateCompilationDatabaseOnly(): boolean;
74+
setCreateCompilationDatabaseOnly(value: boolean): CompileReq;
75+
76+
77+
getSourceOverrideMap(): jspb.Map<string, string>;
78+
clearSourceOverrideMap(): void;
79+
7380

7481
serializeBinary(): Uint8Array;
7582
toObject(includeInstance?: boolean): CompileReq.AsObject;
@@ -101,6 +108,9 @@ export namespace CompileReq {
101108
exportDir: string,
102109
clean: boolean,
103110
exportBinaries: boolean,
111+
createCompilationDatabaseOnly: boolean,
112+
113+
sourceOverrideMap: Array<[string, string]>,
104114
}
105115
}
106116

arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js

+64-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ proto.cc.arduino.cli.commands.CompileReq.toObject = function(includeInstance, ms
140140
optimizefordebug: jspb.Message.getBooleanFieldWithDefault(msg, 16, false),
141141
exportDir: jspb.Message.getFieldWithDefault(msg, 18, ""),
142142
clean: jspb.Message.getBooleanFieldWithDefault(msg, 19, false),
143-
exportBinaries: jspb.Message.getBooleanFieldWithDefault(msg, 20, false)
143+
exportBinaries: jspb.Message.getBooleanFieldWithDefault(msg, 20, false),
144+
createCompilationDatabaseOnly: jspb.Message.getBooleanFieldWithDefault(msg, 21, false),
145+
sourceOverrideMap: (f = msg.getSourceOverrideMap()) ? f.toObject(includeInstance, undefined) : []
144146
};
145147

146148
if (includeInstance) {
@@ -250,6 +252,16 @@ proto.cc.arduino.cli.commands.CompileReq.deserializeBinaryFromReader = function(
250252
var value = /** @type {boolean} */ (reader.readBool());
251253
msg.setExportBinaries(value);
252254
break;
255+
case 21:
256+
var value = /** @type {boolean} */ (reader.readBool());
257+
msg.setCreateCompilationDatabaseOnly(value);
258+
break;
259+
case 22:
260+
var value = msg.getSourceOverrideMap();
261+
reader.readMessage(value, function(message, reader) {
262+
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
263+
});
264+
break;
253265
default:
254266
reader.skipField();
255267
break;
@@ -406,6 +418,17 @@ proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter = function(mess
406418
f
407419
);
408420
}
421+
f = message.getCreateCompilationDatabaseOnly();
422+
if (f) {
423+
writer.writeBool(
424+
21,
425+
f
426+
);
427+
}
428+
f = message.getSourceOverrideMap(true);
429+
if (f && f.getLength() > 0) {
430+
f.serializeBinary(22, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
431+
}
409432
};
410433

411434

@@ -790,6 +813,46 @@ proto.cc.arduino.cli.commands.CompileReq.prototype.setExportBinaries = function(
790813
};
791814

792815

816+
/**
817+
* optional bool create_compilation_database_only = 21;
818+
* @return {boolean}
819+
*/
820+
proto.cc.arduino.cli.commands.CompileReq.prototype.getCreateCompilationDatabaseOnly = function() {
821+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 21, false));
822+
};
823+
824+
825+
/**
826+
* @param {boolean} value
827+
* @return {!proto.cc.arduino.cli.commands.CompileReq} returns this
828+
*/
829+
proto.cc.arduino.cli.commands.CompileReq.prototype.setCreateCompilationDatabaseOnly = function(value) {
830+
return jspb.Message.setProto3BooleanField(this, 21, value);
831+
};
832+
833+
834+
/**
835+
* map<string, string> source_override = 22;
836+
* @param {boolean=} opt_noLazyCreate Do not create the map if
837+
* empty, instead returning `undefined`
838+
* @return {!jspb.Map<string,string>}
839+
*/
840+
proto.cc.arduino.cli.commands.CompileReq.prototype.getSourceOverrideMap = function(opt_noLazyCreate) {
841+
return /** @type {!jspb.Map<string,string>} */ (
842+
jspb.Message.getMapField(this, 22, opt_noLazyCreate,
843+
null));
844+
};
845+
846+
847+
/**
848+
* Clears values from the map. The map will be non-null.
849+
* @return {!proto.cc.arduino.cli.commands.CompileReq} returns this
850+
*/
851+
proto.cc.arduino.cli.commands.CompileReq.prototype.clearSourceOverrideMap = function() {
852+
this.getSourceOverrideMap().clear();
853+
return this;};
854+
855+
793856

794857
/**
795858
* List of repeated fields within this message type.

0 commit comments

Comments
 (0)