-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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 manager: dependency resolver (take 2) #8600
Conversation
e5427a5
to
1f727d3
Compare
@cmaglie |
The new method will be used in next commits to handle installations of multiple libraries. This commit fix also minor bug in progress bar.
It's no more required to pass this information from outside, just library that is being installed is now sufficient.
This is the base for the GUI that will be introduced in the next commits.
Consider a case where the user decides to install a library `A` that depends on library `B` and `B` is not up-to-date (i.e. is installed a version that is not the latest), then the user is asked to "install" both libraries `A` and `B`, effectively upgrading `B`. With this change the already installed library `B` is left untouched and not displayed in the missing dependencies.
1f727d3
to
4268ce9
Compare
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8600-BUILD-887-linux32.tar.xz ℹ️ The |
Second attempt to solve #5795.
This PR updates #6004 and replace it.
The dependency tree is read from the
library_index.json
, downloaded fromarduino.cc
, this json is build from the information contained in thelibrary.properties
of each library so, to complete this PR, we should add a field in thelibrary.properties
to explicitly specify dependencies.In this PR the dependent libraries are handled without versions constraints, this will be added in a future development.
The latest commit has been added for testing purposes and it will be removed before merging this PR: it disables the automatic download of
library_index.json
and reads the index fromlibrary_index_test.json
, this way we can test this PR by providing a fakelibrary_index_test.json
.This is the index that I used for testing: library_index_test.zip that contains a modified fake entry:
and this is the dialog that appears when we try to install "ArduinoCloud":
(of course ArduinoCloud doesn't need ArduinoSound, this is just for testing multiple dependencies)
This PR requires a change in the library indexer (to report
requires
field inlibrary_index.json
) that is begin done right now.