Open ceraolo opened 2 months ago
As a user, this dialog is confusing me.
Where would I want to upgrade, if not to a newer version? What is the difference between "newer" and "newest"? Why would I ever intentionally break something by installing non-compatible versions? It says "may" -- when would that occur? How can I make the judgement if that is OK for me? I would have always assumed that "upgrade" means any old versions get removed, but from @ceraolo's post it's apparent that not everybody shares that assumption... do old version get removed? does that depend on the state of the checkbox?
So, for me too the meaning of checking or unchecking that box, and what happens when I "Upgrade" are totally unclear, and I would probably only click "Cancel".
I would have always assumed that "upgrade" means any old versions get removed, but from @ceraolo's post it's apparent that not everybody shares that assumption...
I also assume this meaning for the word upgrade: see point 2 of the numbered list and and third dot of my previous comment. But since the OM dialogue is unclear I just wondered what OM will actually do depending on user's action.
However, upgrading is not always the right choice, since users may want to keep both old and new versions of libraries.
After reading your message I still believe the behaviour should be as indicated in my previous comment.
This dialog involves installing newer (or newest) versions of a library, but it doesn't remove existing ones, so it's not going to break anything. Just add libraries to the pool of installed ones.
As I understand, if you don't click you get all the newer versions that were published after you last installed. If you do, you'll only get the most recent one.
Note that if newer version of library X is installed which is backwards compatible with an already installed one, OMC will load the newer one automatically. However, if you only install the newest one an that is incompatible, it won't.
This dialog just calls upgradeInstalledPackages, the checkbox value is passed to the optional input.
@sjoelund, @adeas31 can you please comment on that?
Maybe we should remove the comment (may install the latest non-compatible versions) which is kind of misleading. And write "Install the latest versions only" instead of "Install newest versions" which is not very clear.
I also agree that "Upgrade" is possibly misleading, because it may imply that we uninstall old ones (which we don't).
Maybe we could change the text to:
Install all the newer versions of installed libraries that have become available; existing ones are retained
and the text of the checkbox could be changed to
Only install the latest (last?) versions of installed libraries
What do you think?
The proposal in https://github.com/OpenModelica/OpenModelica/issues/12831#issuecomment-2344718709 would make things clear, while addressing the first three rows of this ticket's description.
However, I still think that a command to install simultaneously all the newer versions of already installed libraries is bad. If I have 10 libraries installed and I'm working with MyLibrary, most commonly I would just check what happens with the newer version(s) of it, and install this newer version(s), not clutter my PC with the newer versions of all the 10 installed libraries. Had I decided to dedicate a few hour's work on this ticket, I would make installation of new versions selective, as proposed in this ticket's description at point 1.
Sooner or later, I think that a mechanism to remove libraries should be added to avoid accumulation of libraries (point 2 of this ticket's description). This should not be complicated: I envisage that it is just the equivalent (in Windows) of a few clicks: deleting the involved library from "user"\AppData\Roaming.openmodelica.libraries
I still think that a command to install simultaneously all the newer versions of already installed libraries is bad. If I have 10 libraries installed and I'm working with MyLibrary, most commonly I would just check what happens with the newer version(s) of it, and install this newer version(s), not clutter my PC with the newer versions of all the 10 installed libraries.
In principle I agree with you. In practice, these files get into some obscure system directory and they would hardly take more than a few hundred megabytes. In an era of TB-sized mass storage, this is probably no big deal.
Had I decided to dedicate a few hour's work on this ticket, I would make installation of new versions selective, as proposed in this ticket's description at point 1.
I agree in principle, but we have a lot of higher priority tasks to take care of. In any case, you can always delete those libraries manually from the %appdata%.openmodelica\libraries directory.
Sooner or later, I think that a mechanism to remove libraries should be added to avoid accumulation of libraries (point 2 of this ticket's description). This should not be complicated: I envisage that it is just the equivalent (in Windows) of a few clicks: deleting the involved library from "user"\AppData\Roaming.openmodelica.libraries
Ditto 😃
read this: https://github.com/OpenModelica/OpenModelica/issues/12831#issuecomment-2348962002.
I understand very well the libraries's size argument. It is not for size that I thought the changes proposed in this ticket are important. It is, instead, because clean programs make life easier to users, and reduce possibility of mistakes. And I care user's time, and OMEdit GUI impact on user's experience. And, finally, because I envisaged that the effort involved would be low: at the end of the day, what really matters is the cost/benefit ratio.
However, I understand your position, @casella. Maybe this can go in the list I have in mind for a possible future DFD (I mean year 2025).
Description
If I try to upgrade installed libraries I get the following box:
Maibe it's me, but I really don't understand it (even after consultig the OM documentation): => what will happen if I don't check the check box? => what will happen if I check it?
I did not think to this a lot, but maibe this box shoud be different:
In other words, managing the library should let the user, for each installed library, to
If OM programmers want to leave in place the current behaviour that (if I understand well) operates on all the installed libraries, this can be obtained by a checkbox to select/unselect all items. I'm not pushing in that direction: for me it would be a too powerful feature (could make disasters).