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

Library reference pages may list incompatible boards in the compatibility list #11871

Open
sterretjeToo opened this issue Mar 16, 2023 · 4 comments
Labels
Component: Website Issues related to arduino.cc, but not the documentation content Type: Bug

Comments

@per1234 per1234 transferred this issue from arduino/reference-en Mar 16, 2023
@matthijskooijman
Copy link
Collaborator

I suspect this list is autogenerated from the "architecture = avr" or so in the library.properties. I don't think libraries can explicitly state compatibility with some boars, but not others, so this should probably be fixed in the description instead (and looking at that page, the "compatibility note" even already does that, though it might be a bit more specific maybe).

@per1234
Copy link
Collaborator

per1234 commented Mar 16, 2023

Hi @sterretjeToo.

@matthijskooijman already answered while I was writing, but I'll post anyway in case there is a little bit of additional information:

The library reference pages like https://www.arduino.cc/reference/en/libraries/keyboard/ are automatically generated for all the libraries in the Arduino Library Manager based on the information in their library.properties metadata file.

The "Compatibility" list on the reference pages is based on the architectures field of that file. The reference page generator simply adds all the official boards of each architecture in the field to the list.

As in this case, a library might require capabilities that are not provided by all boards of that architecture. There is no machine readable data that would allow the generator to understand this so boards that are incompatible with the library may be listed in the reference page.

There has been some internal discussion about how the library metadata system might be expanded to indicate board compatibility, but for now we settled on warning the reader about the situation via the "Compatibility note" on the reference page:

Compatibility Note

Note: while the library is supposed to compile correctly on these architectures, it might require specific hardware features that may be available only on some boards.

@per1234 per1234 added Type: Bug Component: Website Issues related to arduino.cc, but not the documentation content labels Mar 16, 2023
@per1234 per1234 changed the title Keyboard library mentions Arduino Uno/Mega/Nano in the compatibility list Library reference pages may list incompatible boards in the compatibility list Mar 16, 2023
@sterretjeToo
Copy link
Author

sterretjeToo commented Mar 16, 2023

Unfortunately that note does not reveal anything to the beginner that consults the page. Please explain how somebody is to know what that specific hardware is?

@per1234
Copy link
Collaborator

per1234 commented Dec 19, 2024

the "Compatibility note" on the reference page:

Compatibility Note

Note: while the library is supposed to compile correctly on these architectures, it might require specific hardware features that may be available only on some boards.

The note has since been changed to one that is even more vague and cryptic, as well as being easier to overlook. It now says:

Compatibility with an architecture means that code can be compiled and uploaded to a board from the list below:

The note is inaccurate since the list can contain boards for which the library will not compile. For example, it claims that the Keyboard library can be compiled for the UNO R3, classic Nano, and Mega boards:

https://docs.arduino.cc/libraries/keyboard/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Website Issues related to arduino.cc, but not the documentation content Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants