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

Questions about the creation of libraries #11779

Closed
Tinyu-Zhao opened this issue Apr 8, 2022 · 2 comments
Closed

Questions about the creation of libraries #11779

Tinyu-Zhao opened this issue Apr 8, 2022 · 2 comments
Assignees
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug Type: Duplicate Another item already exists for this topic

Comments

@Tinyu-Zhao
Copy link

Tinyu-Zhao commented Apr 8, 2022

Hello, because our product type is rich, so the peripherals available for microcontrollers are also more, recently there is a user feedback because one of our microcontroller long pants added too many peripheral dependencies, and its screen is too small, so that the whole screen display can not be, there is no way to do any operation.

IMG_2243

So we want to create a dependency repository to store all the dependencies, and then the microcontroller depends on this "dependency" library to arrive at the download time to recursively download all the dependent items

Just like this repositories
Then fill in the dependencies in the M5Stack repository as "M5-Depends"

The dependence of one of our microcontrollers M5Stack

@per1234
Copy link
Collaborator

per1234 commented Apr 8, 2022

Hi @Tinyu-Zhao. You are welcome to submit such a "dependencies container" library as long as it meets the requirements.

Arduino even has one that is used to define the "built-in" libraries that should be automatically installed on the first run of Arduino IDE 2.x. You can use that as a reference:

https://github.com/arduino-libraries/Arduino_BuiltIn


Unfortunately, this will not serve as a workaround for the bug with the Arduino IDE 1.x dependencies installation dialog (#10647). The reason is that the dialog lists transitive dependencies. So even if you change the depends field in the library.properties file of the "M5Stack" library to:

depends=M5-Depends

The Arduino IDE Library Manager dependencies installation dialog for the "M5Stack" library will still display all the transitive dependencies from the "M5-Depends" library. So the effect will actually be to add one more dependency to the list.


I am happy to tell you that Arduino IDE 2.x does correctly handle this situation by making the dependencies list scrollable when it exceeds the available display space:

image

Unfortunately, the users of Arduino IDE 1.x will continue to be affected by #10647 until an equivalent fix is made there.

Since we are already tracking the Arduino IDE 1.x dependencies dialog bug at #10647, I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.


FYI, I see that the "M5Stack" library is affected by a separate bug in Arduino IDE 2.x: arduino/arduino-ide#621, and this is something you can easily fix by:

  1. Correct the depends field of the "M5Stack" library so that it only contains libraries that are available from Library Manager.
  2. Make a new release of the "M5Stack" library.

@per1234 per1234 closed this as completed Apr 8, 2022
@per1234 per1234 transferred this issue from arduino/library-registry Apr 8, 2022
@per1234 per1234 added Type: Bug Type: Duplicate Another item already exists for this topic Component: Board/Lib Manager Boards Manager or Library Manager labels Apr 8, 2022
@per1234 per1234 self-assigned this Apr 8, 2022
@Tinyu-Zhao
Copy link
Author

Thank you for your help, my friend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

2 participants