-
-
Notifications
You must be signed in to change notification settings - Fork 403
Multiple installations cause library to be perpetually updatable #1871
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
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Milestone
Comments
3 tasks
5 tasks
Fixed by #1878 |
Unfortunately the bug was not fixed:
|
Merged
5 tasks
Merged
5 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
Libraries are identified by the "real name" defined in the
name
field of thelibrary.properties
metadata file (or by the folder name in the case of a "legacy"/"1.0 format" library that doesn't have a metadata file).During the implementation of the Arduino Library Manager system, the unfortunate choice was made to reusing the user's library folder (
<directories.data/libraries
orLIBRARY_LOCATION_USER
) instead of using a dedicated folder for Library Manager. This can be problematic because the set of libraries recognized by Library Manager include those installed by the user via alternative methods:arduino-cli lib install --git-url
arduino-cli lib install --zip-file
.Libraries installed via
arduino-cli lib install
are always installed to a folder named by "sanitizing" the "real name". However, installations of a library made via other methods can have any arbitrary folder name.This means that it is possible for multiple libraries with the same identifier to be installed in
LIBRARY_LOCATION_USER
.🐛 If multiple libraries with the same identifier are installed in
LIBRARY_LOCATION_USER
, and one has an outdated version, the library is always shown as updatable.To reproduce
🐛 The library is listed as updatable even after attempting to upgrade it.
Expected behavior
I don't see that there is any good way for the Library Manager functionality to support multiple libraries with the same identifier in
LIBRARY_LOCATION_USER
. The only feasible resolution is to prohibit this.Any operation that alters library installations should error if multiple installations of the library are present in
LIBRARY_LOCATION_USER
. The error message should clearly explain the problem to the user as well as the resolution of manually removing one of the redundant installations.These are the commands which require this change:
lib upgrade
lib install
lib uninstall
Arduino CLI version
3cd782d
Operating system
Windows, Ubuntu
Operating system version
Windows 10, Ubuntu 20.04
Additional context
A bug in Arduino CLI can cause it to produce these conditions: #1870
However, the conditions can still occur even after that bug is fixed because users can still produce multiple installations via manual installations.
Reports:
There is currently a bug which may be inadvertently mitigating the effects of multiple installations: #932
Once that bug is fixed, it is likely other commands will also be broken under these conditions.
Issue checklist
The text was updated successfully, but these errors were encountered: