Skip to content

name vs real_name inconsistency when executing lib commands #932

Closed
@kittaakos

Description

@kittaakos

Bug Report

  • The name of a library is the name of the folder in which the lib is contained: {directories.user}/Arduino/${name}
  • The real_name of a library is the human-readable name of the lib. It comes from the library.properties.

This might be the desired behavior but it's strange. When I do a lib search or lib install the real_name is required, when I run a lib list, the name is required.

Current behavior

lib search works with real_name, not with name:

% ./arduino-cli lib search  AllThingsTalk_LoRaWAN_SDK               
No libraries matching your search.
Did you mean...
AllThingsTalk LoRaWAN SDK

% ./arduino-cli lib search "AllThingsTalk LoRaWAN SDK" 
Name: "AllThingsTalk LoRaWAN SDK"
  Author: AllThingsTalk
  Maintainer: Vanja <[email protected]>
  Sentence: LoRaWAN SDK for AllThingsTalk Maker
  Paragraph: Compatible with Microchip RN2483 and RN2903 devices.
  Website: https://github.com/allthingstalk/arduino-lorawan-sdk
  Category: Communication
  Architecture: *
  Types: Contributed
  Versions: [3.0.0, 3.1.0, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6]
  Provides includes: AllThingsTalk_LoRaWAN.h

lib install works with real_name but does not work with name:

% ./arduino-cli lib install AllThingsTalk_LoRaWAN_SDK 
Error resolving dependencies for AllThingsTalk_LoRaWAN_SDK: looking for library: library AllThingsTalk_LoRaWAN_SDK not found
% ./arduino-cli lib install "AllThingsTalk LoRaWAN SDK"
AllThingsTalk LoRaWAN SDK depends on AllThingsTalk LoRaWAN [email protected]
Downloading AllThingsTalk LoRaWAN [email protected]...
AllThingsTalk LoRaWAN [email protected] already downloaded
Installing AllThingsTalk LoRaWAN [email protected]...
Already installed AllThingsTalk LoRaWAN [email protected]

lib list works with name, but does not work with real_name:

% ./arduino-cli lib list AllThingsTalk_LoRaWAN_SDK
Name                      Installed     Available         Location Description                                                
AllThingsTalk_LoRaWAN_SDK 3.1.6         -                 user     LoRaWAN SDK for AllThingsTalk Maker                        

% ./arduino-cli lib list "AllThingsTalk LoRaWAN SDK"
No libraries installed.

I think this is a bug.

Expected behavior

All lib commands work either with both name and real_name or all require either the name or real_name.

Environment

  • CLI version (output of arduino-cli version): arduino-cli Version: 0.13.0-rc1 Commit: ef57e49
  • OS and platform: macOS Catalina (10.15.6 (19G2021))

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions