mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-07 04:36:33 +00:00
Removed real_name
of the libraries.
It has been removed from the gRPC API: arduino/arduino-cli#1890 This PR switches from `real_name` to `name` in the UI, as the `name` is the canonical form provided by the CLI. Closes #1525 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
0c20ae0e28
commit
61a11a0857
@ -159,9 +159,9 @@
|
|||||||
"arduino": {
|
"arduino": {
|
||||||
"cli": {
|
"cli": {
|
||||||
"version": {
|
"version": {
|
||||||
"owner": "cmaglie",
|
"owner": "arduino",
|
||||||
"repo": "arduino-cli",
|
"repo": "arduino-cli",
|
||||||
"commitish": "download_progress_refactor"
|
"commitish": "c8ff042"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fwuploader": {
|
"fwuploader": {
|
||||||
|
@ -162,12 +162,6 @@ export enum LibraryLocation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LibraryPackage extends ArduinoComponent {
|
export interface LibraryPackage extends ArduinoComponent {
|
||||||
/**
|
|
||||||
* Same as [`Library#real_name`](https://arduino.github.io/arduino-cli/latest/rpc/commands/#library).
|
|
||||||
* Should be used for the UI, and `name` is used to uniquely identify a library. It does not have an ID.
|
|
||||||
*/
|
|
||||||
readonly label: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of string that should be included into the `ino` file if this library is used.
|
* An array of string that should be included into the `ino` file if this library is used.
|
||||||
* For example, including `SD` will prepend `#include <SD.h>` to the `ino` file. While including `Bridge`
|
* For example, including `SD` will prepend `#include <SD.h>` to the `ino` file. While including `Bridge`
|
||||||
|
@ -765,9 +765,6 @@ export class Library extends jspb.Message {
|
|||||||
getContainerPlatform(): string;
|
getContainerPlatform(): string;
|
||||||
setContainerPlatform(value: string): Library;
|
setContainerPlatform(value: string): Library;
|
||||||
|
|
||||||
getRealName(): string;
|
|
||||||
setRealName(value: string): Library;
|
|
||||||
|
|
||||||
getDotALinkage(): boolean;
|
getDotALinkage(): boolean;
|
||||||
setDotALinkage(value: boolean): Library;
|
setDotALinkage(value: boolean): Library;
|
||||||
|
|
||||||
@ -836,7 +833,6 @@ export namespace Library {
|
|||||||
sourceDir: string,
|
sourceDir: string,
|
||||||
utilityDir: string,
|
utilityDir: string,
|
||||||
containerPlatform: string,
|
containerPlatform: string,
|
||||||
realName: string,
|
|
||||||
dotALinkage: boolean,
|
dotALinkage: boolean,
|
||||||
precompiled: boolean,
|
precompiled: boolean,
|
||||||
ldFlags: string,
|
ldFlags: string,
|
||||||
|
@ -5447,7 +5447,6 @@ proto.cc.arduino.cli.commands.v1.Library.toObject = function(includeInstance, ms
|
|||||||
sourceDir: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
sourceDir: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
||||||
utilityDir: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
utilityDir: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
||||||
containerPlatform: jspb.Message.getFieldWithDefault(msg, 14, ""),
|
containerPlatform: jspb.Message.getFieldWithDefault(msg, 14, ""),
|
||||||
realName: jspb.Message.getFieldWithDefault(msg, 16, ""),
|
|
||||||
dotALinkage: jspb.Message.getBooleanFieldWithDefault(msg, 17, false),
|
dotALinkage: jspb.Message.getBooleanFieldWithDefault(msg, 17, false),
|
||||||
precompiled: jspb.Message.getBooleanFieldWithDefault(msg, 18, false),
|
precompiled: jspb.Message.getBooleanFieldWithDefault(msg, 18, false),
|
||||||
ldFlags: jspb.Message.getFieldWithDefault(msg, 19, ""),
|
ldFlags: jspb.Message.getFieldWithDefault(msg, 19, ""),
|
||||||
@ -5548,10 +5547,6 @@ proto.cc.arduino.cli.commands.v1.Library.deserializeBinaryFromReader = function(
|
|||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setContainerPlatform(value);
|
msg.setContainerPlatform(value);
|
||||||
break;
|
break;
|
||||||
case 16:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setRealName(value);
|
|
||||||
break;
|
|
||||||
case 17:
|
case 17:
|
||||||
var value = /** @type {boolean} */ (reader.readBool());
|
var value = /** @type {boolean} */ (reader.readBool());
|
||||||
msg.setDotALinkage(value);
|
msg.setDotALinkage(value);
|
||||||
@ -5724,13 +5719,6 @@ proto.cc.arduino.cli.commands.v1.Library.serializeBinaryToWriter = function(mess
|
|||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getRealName();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
16,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
f = message.getDotALinkage();
|
f = message.getDotALinkage();
|
||||||
if (f) {
|
if (f) {
|
||||||
writer.writeBool(
|
writer.writeBool(
|
||||||
@ -6084,24 +6072,6 @@ proto.cc.arduino.cli.commands.v1.Library.prototype.setContainerPlatform = functi
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* optional string real_name = 16;
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
proto.cc.arduino.cli.commands.v1.Library.prototype.getRealName = function() {
|
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, ""));
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} value
|
|
||||||
* @return {!proto.cc.arduino.cli.commands.v1.Library} returns this
|
|
||||||
*/
|
|
||||||
proto.cc.arduino.cli.commands.v1.Library.prototype.setRealName = function(value) {
|
|
||||||
return jspb.Message.setProto3StringField(this, 16, value);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bool dot_a_linkage = 17;
|
* optional bool dot_a_linkage = 17;
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
|
@ -124,11 +124,11 @@ export class ExamplesServiceImpl implements ExamplesService {
|
|||||||
* location of the examples. Otherwise it creates the example container from the direct examples FS paths.
|
* location of the examples. Otherwise it creates the example container from the direct examples FS paths.
|
||||||
*/
|
*/
|
||||||
private async tryGroupExamples({
|
private async tryGroupExamples({
|
||||||
label,
|
name,
|
||||||
exampleUris,
|
exampleUris,
|
||||||
installDirUri,
|
installDirUri,
|
||||||
}: LibraryPackage): Promise<SketchContainer> {
|
}: LibraryPackage): Promise<SketchContainer> {
|
||||||
const container = SketchContainer.create(label);
|
const container = SketchContainer.create(name);
|
||||||
if (!installDirUri || !exampleUris.length) {
|
if (!installDirUri || !exampleUris.length) {
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ export class LibraryServiceImpl
|
|||||||
if (installedLib.hasLibrary()) {
|
if (installedLib.hasLibrary()) {
|
||||||
const lib = installedLib.getLibrary();
|
const lib = installedLib.getLibrary();
|
||||||
if (lib) {
|
if (lib) {
|
||||||
installedLibsIdx.set(lib.getRealName(), installedLib);
|
installedLibsIdx.set(lib.getName(), installedLib);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -210,7 +210,6 @@ export class LibraryServiceImpl
|
|||||||
return toLibrary(
|
return toLibrary(
|
||||||
{
|
{
|
||||||
name: library.getName(),
|
name: library.getName(),
|
||||||
label: library.getRealName(),
|
|
||||||
installedVersion,
|
installedVersion,
|
||||||
installable: true,
|
installable: true,
|
||||||
description: library.getSentence(),
|
description: library.getSentence(),
|
||||||
@ -443,7 +442,6 @@ function toLibrary(
|
|||||||
): LibraryPackage {
|
): LibraryPackage {
|
||||||
return {
|
return {
|
||||||
name: '',
|
name: '',
|
||||||
label: '',
|
|
||||||
exampleUris: [],
|
exampleUris: [],
|
||||||
installable: false,
|
installable: false,
|
||||||
deprecated: false,
|
deprecated: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user