owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.36k stars 2.06k forks source link

Allow apps to specify dependencies about other apps #18710

Closed nickvergessen closed 9 years ago

nickvergessen commented 9 years ago

E.g. the tasks app requires calendar to be installed, however it currently installs and then spams the log, instead of informing about the dependency while installing: https://github.com/owncloud/tasks/issues/249

karlitschek commented 9 years ago

it's a design principal of ownCloud to not have dependencies between apps. this has to solved in a different way. Apps have to work without specific other apps being installed. Communication could happen without abstract core interfaces.

nickvergessen commented 9 years ago

Woot? We have the possibility to specify OC versions, lib versions, commands, etc. We can simply add it there as well, this is not a replacement for avoiding inner app dependency. Some apps just don't make sense without another app. That has nothing to do with stripping out the actual app dependency into core, totally agree on that point.

owncloud_-_2015-08-31_17 10 56

As you can see on the tasks app, people do stuff like that. So I think it is better to give them a clean way of doing that. @DeepDiver1975

Other examples:

Future samples:

PR is here: https://github.com/owncloud/core/pull/18714

raimund-schluessler commented 9 years ago

I must admit that I would like to see this (although I know that inter app dependencies are not wanted and must be prevented and removed). However, adding this won't hurt and allows to cleanly specify such dependencies until they can finally be removed https://github.com/owncloud/tasks/issues/221. Regarding Tasks this won't be possible/reasonable until unified Web/Card/CalDAV endpoint is in core.

karlitschek commented 9 years ago

This is the totally wrong direction as discussed several times. dependencies on the base system are fine but no inner app dependencies. in fact they shouldn't even call it's code. everyting needs to go through proper core interfaces.

MorrisJobke commented 9 years ago

With the new hardened code loader we need something like this https://github.com/owncloud/activity/pull/386#issuecomment-138226156

nickvergessen commented 9 years ago

No @MorrisJobke this has nothing to do with that.

The problem is that app.php is executed, although the classes that are used inside of it may not be loadable

MorrisJobke commented 9 years ago

The problem is that app.php is executed, although the classes that are used inside of it may not be loadable

ah ... mixed it up. Sorry.

DeepDiver1975 commented 9 years ago

In case apps want to share code: extract it as a lib and require the lib using composer in the apps.

Apps which as of today depend on each other can code the dependency by themselves. No need to add some semiofficial dependency.