Who cleans up orphaned extension dependencies?

Hey,
when installing and removing any XWiki extension that installs extra dependencies, there are remnants.

Reproduction steps:

  1. Install “Diagram Application (Pro)” (this XWiki SAS extension pulls in “Licensor API”)
  2. Uninstall “Diagram Application (Pro)”
  3. Search for “Licensor API”
  4. See that this extension installed by the Diagram Application is still installed

The distribution wizard has a orphaned dependency cleanup. What is the solution for manual extension installs? Am I missing something?

I can only imagine uninstalling every extension manually and checking if something still depends on it.

You can’t expect dependencies to be deleted automatically, firstly because those dependency can be still be used by other extension, and secondly you didn’t install them manually - the EM installed them automatically and uninstalls only those for which you manually trigger the uninstall operation.

That’s why, until implantation of feature XWIKI-12701. Only DW provides functionality of deleting orphaned extensions, see explanation in Orphaned dependencies step. Normally on each upgrade once admin user completed upgrading Flavor, the DW will list all extensions that are considered unused and suggest that user to remove them safely.

Alternative, there’s kludge (not official way), where you can force DW to appear by deleting jobs\status\3\distribution folder. This folder doesn’t contain important information, only the records on run DW with version to which flavor has been upgraded and timeframe when each steps happened. This way your simply telling your XWiki instance, that the upgrade or install never happened, even though you have the Flavor installed on your end. And restarting XWiki, will prompt you with DW, with only steps regarding orphaned extensions and steps where you can check for updates of install extensions.

P.S. You could mention in your post any XWiki extensions from the community, as your question has nothing to do with extensions that are covered by license and includes a support contract for professional help from XWiki SAS. And, the XWiki forum is not the ideal place for such questions.

Is it impossible to track down why an extension was installed? Basically you would need to resolve why an extension was installed. If it was selected by the user specifically or because a top level extension pulled it in as an dependency.

Deleting the folder jobs\status\3\distribution from the Xwiki data volume did not open the DW when I tried it. I am now getting minor errors in the log on the start page.

I was just using this XWiki SAS extension as an example, this happens with extensions in general. Why is it a problem to mention XWiki SAS or related extensions here? I am not asking for any personal fix, customization or extension support.

@tmortagne would probably know better but right now I don’t think we track down the hierarchy of extensions in a way allowing to have such info.

It’s not a problem. I think @nikpetrenko mention was to emphasize that if you were looking for some support for the Diagram Application Pro extension specifically then it wasn’t the right channel.

We have this information (in the installed extension in the admin, click Details and then Dependencies) but only if the top level extension is still installed. If it’s not installed anymore you just know that en extension has been installed as dependency, but without any known backward dependency.