-
-
Notifications
You must be signed in to change notification settings - Fork 7k
No way to remove library from the library manager dialog. #2878
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
Comments
I've written a short explanation: https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ#how-can-i-delete-a-library Does it make sense? |
Kind of... I understand why you wouldn't want to delete libraries that the user was developing or editing. On the other hand, it seems confusing that I can click a button to install a library but can't click another button to remove it. Maybe there should be a check to see if the library has been edited since it was installed and, if so, you could give a warning before deleting it? For libraries that were installed manually, it doesn't seem so strange to require them to be deleted manually. (It might be convenient to be able to delete them from the dialog, but I understand why you might not want it.) Also, is it possible to move libraries into the user's trash instead of deleting the files outright? That might eliminate some of the concern about having a simple way to remove libraries. |
Accessing trashbin could really help: I've never investigated how to do that. Anyway, you seem to have my same point of view (allow deletion of "managed" libs, not user libs), but it clashes with that of Alice :) It's a UX issue we should discuss on basecamp |
Moving files to trashbin could be achieved using these (bundled?) utilities: -Linux: There is gvfs-trash (only for Gnome) and some utilities: trash-cli (requires Python), xdg-trash (requires Node)... |
Thanks @q2dg , I'll loot at them |
No worth the effort! When the user finds out later it was an error to delete a library he can always download and reinstall it from the library manager. |
Perhaps the IDE should compare all of a library's files to their originals, before deleting. If any are modified, maybe a "are you sure you want to discard your changes" dialog could appear? Or maybe the IDE should refuse to delete and suggest the user has to do it manually. |
ffissore, I disagree with your logic on specifically excluding a delete function. I do not want nor need your "help" in preventing me accidentally deleting stuff. What I do want is to uninstall all the uneeded crap and clutter out of the library manager. |
I suggested the idea of leaving libs installed via mgr in their uncompressed form (using them as is), which would assist with the assessing if it was modified (zipped=can delete), as well as allow multiple versions to dit in the libraries folder side by side without any risk of interference. |
@TwatBurglar I'm sorry you've missed the news. I no longer work for Arduino. Please keep in touch with @cmaglie |
what the heck is all of this jibberish... |
@jimsy3, this "jibberish" is talking about adding a way to remove installed libraries via the Library Manager GUI. Of course you have always been able to delete library files off your computer outside the Arduino IDE. That's completely off topic. |
The name is not "Library Installer" it is "Library Manager" and part of managing your libraries includes removing them. Just saying..... The boards manager has an option to remove installed cores. I could understand not providing a way to remove IDE bundled libraries as that could really screw things up but there should be a way to remove any library that is in the users sketchbook area. I believe that people are over thinking this particularly if considering any complexities such as using some kind of trash bin or any kind of attempt to check on editing the library etc... For the time being a simple remove button for any sketchbook library with a conformation dialog should be good enough. Longer term the library manager needs an entire revamp as the current methodology of using the users sketchbook for any/all library updates including the IDE bundled library updates is wrong and broken on so many levels. |
There was some additional good discussion on this topic in #8269 |
Well, It is very strange to be able to install and not to uninstall by the manager, instead of Manager we can call it "Installer and Updater". (#9879) |
I still believe that not having a way to remove/delete a library using the IDE is just plain silly, particularly for a tool called "Library Manager". IMO, that concern is just plain goofy. Perhaps there is a concern that the IDE seems to now be using the users sketchbook for updating bundled libraries. THAT is different issue based on making a terrible decision that needs to be solved independently of this issue. It doesn't need to be complicated. Just put up a dialog with appropriate information and an warning.
And if there is still a concern about it, add a option in the Preferences/Settings that enables library management that enables this capability that must be checked to turn this capability on. For example: At that point, to screw up, the user would have had to
That is 3 levels of protection. |
It is not necessary to add anything other than a file to serve as a flag. If the user enters a library manually, this file will not be present in the library folder. Then, the manager just needs to download the library (the same one that the user has access to) but create a file inside the library folder. It is easier for the user to delete the wrong folder by opening the folder manager than the library manager. |
@rtek1000 It is more complicated than that to try to solve/prevent the potential issue(s) mentioned. A user could have made changes to a library that was or could be installed using the library manager. Then there are users that are still doing manual installs using zip files. Often it is those manually installed libraries that need to be removed since it is easy to do and less sophisticated users have no clue where they ended up being installed on their filesystem. IMO, any library that has been installed using the IDE, should be able to be removed/deleted using the IDE. I still say it isn't worth trying to do any automated checks to try to prevent people from removing certain libraries for these corner cases. Consider this, with the current library manager. A user can install a library, make manual changes to it, then do an update and clobber/lose his changes when the updated library is installed. So just to emphasize, the problem of clobbering a users library and the user losing his modified libraries already exists today. |
Well, if the whole problem revolves around the case that the user has made modifications manually, it should be possible to carry out a checksum of the original library, and if the value saved when installing is not the same when removing, then the user is prompted to make a backup, or not to remove it. As stated, the IDE itself should be able to remove the libraries. I don't know if everyone agrees, but I think that deleting is practically the same thing as updating, either way, it is no longer the same code that was stored after the update. |
I agree, but I also think that the user should always be able to remove/delete, or update any library in the user sketchbook area using the IDE regardless of how the library got there or if it has been modified. To me that is what a tool called a "library manager" should allow the user do. (install, update, uninstall/delete libraries). And this is why I think that all the concern about trying to prevent a user from removing or updating a library in certain situations seems pointless. Not only is it subject to issues/errors that make mistakes that could prevent a user from being able to remove or update a library, but there can be legitimate reasons to want to remove or update a library even if has been installed manually or even manually modified since it was installed. (consider testing/experimentation, you install a library, do some tweaks or fix some bugs, then would like to simply re-install the stock version or update to a new version.) If the IDE library manager were to get "smart" and not allow a library to removed/updated if it were modified from its original form, then the user can no longer always manage the library from the IDE. I believe in keeping things simple. |
I have a related problem. |
@drmpf I'd be happy to help you, but I think the Arduino Forum would be a more appropriate place for that discussion. Please post your question over there. I'll be sure to see it and respond. |
Actually I think there is a 'bug' in the library manager |
Quite the contrary. If the IDE can't know what's okay, then why would the user be any better? The user is even less likely to know what's safe to manually do or delete. 🤦 |
The IDE already scans libraries when doing a compile so it can check all the available libraries, either manually installed or installed via the library manager and update the library manager list accordingly |
Any progress on an "uninstall" option in the IDE Library Manager? Its like turning the key to start your car but having to open the hood to turn it off. |
@fscii
Yep, it seems silly to me that you can't use the IDE to remove a library was installed/added using the IDE. I have seen cases of less technical users that are installing zip files from github. And given the way github constructs it zip images and the way the IDE zip install works, they can end up with multiple copies of the same library in different directories when trying to do updates. I don't understand why there needs to be anything complicated implemented. Fancy stuff adds complexity along with possibility of issues and, IMO, the added capabilities are of questionable value, particularly since I believe it will never be possible to catch all the corner cases.
And once you have this override control capability, aren't you right back to having something much simpler? The primary need is the ability to remove libraries using the library manager and that capability does not exist today. Put up a warning dialog asking for conformation and state that uninstalling / removing a library cannot be undone and once removed, it is gone. It is very simple to implement and yet provides a needed library management capability. In the mean time, it has now been over 6 years of having a library manager and yet there is still no way to remove / uninstall a library using the IDE library manager. |
The capability for uninstalling libraries via Library Manager has been implemented in Arduino IDE 2.x:
|
I tried this on 2.3.2 and it kind of works. However, the library manager does not show all the libraries that are in my sketchbook/libraries directory. Also, if you do something like have a copy of a library in sketchbook/libraries Seems like the GUI could have been a bit different to make things simpler. I'll play with it some more but it does seem like in the existing GUI there are some library manager bugs/issues and they affect more than just removal. |
TMTOWTDI. The "REMOVE" button will only be there if you have the latest version of the library installed. If you have an older version installed then the button will instead be "UPDATE". I chose the universal and most user friendly (IMO) procedure for my instructions but you are welcome to use whatever procedure you prefer.
Yep. That is the intentional design.
If you manually installed the library then you can very well manually uninstall it as well. |
I just installed the Adafruit CC3000 library using the library manager dialog in Arduino 1.6.3. No there's no way to remove the library from the dialog. Shouldn't this be possible?
The text was updated successfully, but these errors were encountered: