Skip to content

Incompatible architecture warning uses incorrect library name #1731

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

Closed
per1234 opened this issue May 17, 2018 · 4 comments
Closed

Incompatible architecture warning uses incorrect library name #1731

per1234 opened this issue May 17, 2018 · 4 comments
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented May 17, 2018

Using Arduino IDE 1.9.0 Beta build 58 and Arduino IDE 1.8.6 Hourly Build 2018-05-15 10:41

  1. File > Preferences > Show verbose output during: > compilation (check) > OK
  2. Tools > Board > Arduino/Genuino Zero
  3. Compile the following sketch:
    #include <ArduinoRobotMotorBoard.h>
    void setup() {}
    void loop() {}

The console displays the following warning:

WARNING: library Robot_Motor claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (samd) architecture(s).

and

Compiling library "Robot_Motor"

and

Using library Robot_Motor at version 1.0.3 in folder: C:\Program Files (x86)\ArduinoIDE\arduino-PR-beta1.9-BUILD-58\libraries\Robot_Motor 

But the name value defined in library.properties for this library is Robot Motor. The "Robot_Motor" in the warning is the library folder name.

I realize the difference between the two is not very dramatic in this demonstration. I chose this library because Robot Motor library is bundled with the Arduino IDE so it provides a minimal demonstration of the issue. The issue is more noticeable with other libraries where the folder name differs more significantly from the name value.

The Arduino IDE uses the name value whenever referring to a library (including the invalid category warning shown in the console) so this causes an inconsistent user experience.

Two of these messages are already using information from library.properties so I can't imagine it would be too difficult to use the name value as well (falling back on the folder name when a library.properties file is absent).

@facchinm
Copy link
Member

@per1234 thanks for noticing, the name being printed is the one used internally (no whitespace and some other small cosmetic stuff based on the containing folder).
Could something like this facchinm/arduino-builder@c20627e work? (of course, in all the mayor places and not only on the "incompatible" string)

@matthijskooijman
Copy link
Collaborator

Sounds good to me. Since we're already printing a list of used libraries with their full paths at the end of the compilation, it doesn't seem relevant to use the folder name in all debug output (you can map the fancy names to folders using that list printed at the end).

Would it make sense to have a method to retrieve the fancy name (and default to the the regular name if unset), or perhaps set RealName to Name when loading if the former is unset to prevent duplicating this defaulting in a bunch of places?

@e-ika

This comment was marked as spam.

@per1234 per1234 added the topic: code Related to content of the project itself label Oct 14, 2021
@per1234 per1234 changed the title arduino-builder doesn't refer to libraries by their library.properties name value Incompatible architecture warning uses incorrect library name May 12, 2022
@per1234 per1234 transferred this issue from arduino/arduino-builder May 12, 2022
@per1234 per1234 added the type: imperfection Perceived defect in any part of project label May 12, 2022
@per1234
Copy link
Contributor Author

per1234 commented Sep 27, 2022

Fixed by #1878

@per1234 per1234 closed this as completed Sep 27, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 27, 2022
@per1234 per1234 assigned per1234 and unassigned umbynos Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

5 participants