On Fri, Jul 7, 2017 at 1:16 PM, Thomas Mortagne <[email protected]> wrote:
> I really don't understand how you end up with this reasoning. > > The only one that knows if a dependency is optional is the developer > of the extension so what is a workaround here is the huge mess > generator you are proposing. > > As I already said 99% of our dependencies are really not optional, in > practice only a few flavor dependencies are and one or two other use > cases. > > There is two different subjects that get mixed up here: > * clearly state in an extension what is absolutely required to work > and what is a nice to have, this is standard stuff and this is what we > are talking about here > * hack your way in the extension index to remove an extension without > removing the extension claiming to require that, this is at best > something for http://extensions.xwiki.org/xwiki/bin/view/Extension/ > Extension+Tweak Are you saying that you have never had to fix a dependency problem in your Linux distribution caused by some bad commit of a developer or by a desynchronization of the repository you installed or just updated stuff from? How you you feel if you were unable to uninstall a dependency from your system that you know for sure you are not using or, even worse, if you know it has a sever bug that can fry your system, even if some important other modules/extensions function very well in practice without it? It makes no sense to deny this power to an admin by design, except if you have some technical limitations/problems in implementing it. The same reasoning applies for the linux "sudo" command. The more control we give people, the more they will love XWiki, not the other way around. Sure, they can end up creating a mess, but it's their mess and we should, at best, warn them about the danger, but that's it. It's basically simple and advanced mode, but for EM. Also, extensions can be anything, not only java code. Sometimes it can even be about a XAR extension or even a webjar (js) that you can really live without, might want a different (even older) version (because you know it does not have a certain bug, or some other reason). More generically, EM now supports adding, removing and upgrading extensions with dependencies. It should, at some point, be able to perform the same operations ignoring dependencies (i.e. affecting a single extension) with the appropriate warnings. Maybe that helps a bit to explain my reasoning. Side note/Wishful thinking: Probably as an extension or as part of the Extension Tweak app, it would be awesome to have a (navigable?) dependency graph of the installed extensions. Maybe we should have that as a GSoC project :) Thanks, Eduard > > > On Fri, Jul 7, 2017 at 12:01 PM, Eduard Moraru <[email protected]> > wrote: > > Hi, > > > > It`s very nice to hear we are progressing on this topic, but I`m not very > > fond of the current solution. Marking dependencies as optional still puts > > the responsibility on the developer to actually do that and makes the > admin > > dependent on the developer's choice and discipline. Feels more like a > > workaround that we will end up having to support. > > > > Working for building whitelists is a tedious process and we will surely > > miss things, and this is only about things that we control in the > standard > > flavor. What about extensions and their dependencies? > > > > Sure, as Caty suggests, one option is to make everything optional by > > default and only have to explicitly specify if a dependency is mandatory. > > > > Hoping we can get to a point where all the power is to the admin running > > XWiki, not the developer. > > > > Getting past the above "critique", it's still very nice to hear that we > > will now have one solution to this old problem. > > > > Thanks, > > Eduard > > > > On Wed, Jul 5, 2017 at 6:43 PM, Thomas Mortagne < > [email protected]> > > wrote: > > > >> On Wed, Jul 5, 2017 at 5:41 PM, Vincent Massol <[email protected]> > wrote: > >> > Hi Thomas, > >> > > >> >> On 5 Jul 2017, at 17:00, Thomas Mortagne <[email protected]> > >> wrote: > >> >> > >> >> Hi everyone, > >> >> > >> >> I just implemented https://jira.xwiki.org/browse/XCOMMONS-1229 which > >> >> allows to indicate that a dependency will be installed by default but > >> >> does not have a string dependency link with the extension, meaning > >> >> that uninstalling it won't impact the backward dependencies (so they > >> >> are not really backward dependencies in that case :)). > >> > > >> > This is very nice. What if I want to uninstall an extension which is > NOT > >> marked as optional (ie force uninstall at your own risks)? > >> > >> If it's not optional then... it's not optional and require to > >> uninstall backward dependency. > >> > >> > > >> >> Now we need to decide what exactly is optional in Standard flavor. > >> >> > >> >> Here are some ideas: > >> >> > >> >> * application-help-center > >> > > >> >> * xwiki-platform-menu-ui > >> > > >> >> * xwiki-platform-wiki-ui-mainwiki > >> > > >> >> * xwiki-platform-office-ui > >> >> * xwiki-platform-invitation-ui > >> >> * xwiki-platform-appwithinminutes-ui > >> > > >> > I think it needs some refactoring first since the pages it generates > >> still need some pages from AWM. > >> > >> Actually I tough about that and IMO if an extension has AWM pages it > >> should have a non optional dependency on AWM (i.e. it would be > >> optional from flavor point of view but non optional from other > >> extension point of view). > >> > >> > > >> >> * xwiki-platform-linkchecker-ui > >> >> * xwiki-platform-sandbox > >> > > >> >> * xwiki-platform-sharepage-ui > >> >> * xwiki-platform-distribution-flavor-tour > >> >> * application-templates-ui > >> > > >> >> > >> >> I did not actually tried to uninstall those so it's possible it's not > >> >> a good idea to uninstall some of them right now (hardcoded use > >> >> somewhere maybe). > >> >> > >> >> WDYT ? > >> > > >> > The list sounds good to start with (we need to test remove them first > >> ofc). > >> > > >> > Thanks > >> > -Vincent > >> > > >> >> -- > >> >> Thomas Mortagne > >> > > >> > >> > >> > >> -- > >> Thomas Mortagne > >> > > > > -- > Thomas Mortagne >

