-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
App Dependencies [WIP] #10777
Comments
Hi, so this should solve: #10775 |
@karlitschek please review as discussed @jancborchardt mockitup - THX |
Hi, currently the SMB external storage using smbclient as well as some previews are only supported on non-windows systems. This could be also added to this. |
THX |
I think this could be also extended to allow linux AND mac together as most dependencies which are checked are only doing a "runningOnWindows()" |
looks good 👍 |
Maybe it's a good idea to add an extra dependency type |
There should be no dependencies between app. So the calls to contacts or calendar should go through a specific interface in core. |
Yeah indeed and that's the case for those apps. But the user/admin should be aware of that extra functionality. Maybe instead of soft/hard mode an extra |
Well - you do not have a dependency on Contacts - but a dependency to the public api. Assuming there are only address books taken from LDAP - there is no need for depending on the Contacts app. |
Hi, two small additions: attribute "os": Can be linux AND mac (as posted above) |
Hi, seems there is also a older proposal available here: https://github.com/owncloud/core/wiki/spec-proposal:-Depend-Check-proposition |
#4017 (comment) @DeepDiver1975 changed your mind? 😄 |
❓ what ❓ |
@DeepDiver1975: Citing you:
What is this PR about? Direct inter-app dependencies? I already wrote some code for this issue, but you've dropped it because this is not what we want. |
@Kondou-ger no no - we still don't want inter app dependencies - this issue describes how we can handle dependencies of apps to their environment - like php module imap is required and so on |
I'd also include the php version since not having this at setup makes the process of checking pretty hard |
Another one would be supported databases |
Linking this one here to show the usecase for PHP minimum version :) owncloud-archive/news#614 |
Some additional things: PHP libs have no consistent way of providing their version. Some can be checked by using phpversion('libname') others provide global constants (infamous example: libxml). Would it be possible to create a file like appinfo/preinstall.php that is included in addition to this where you can define your own checks and throw a generalized exception like LibraryDependencyException in case things dont work out? |
Thanks for your input @Raydiation - much appreciated. You are now talking about php extensions - no php libs which are loaded using composer (because composer is taking care about this version nightmare) For php extensions I'm wondering if there is a need for this because e.g. php 5.4 would for sure have a much older e.g. libxml version shipped - right? In this case devs might even need to compare the lib version based on the php version? Or do I miss the point? |
I'm unsure but I think you can upgrade the libxml and have a newer version in PHP available, regardless of php version |
@karlitschek any objections in moving away from info.xml to info.json? Parsing json is much more comfortable in PHP than this xml parsing. For sure the existing apps with info.xml will continue to be supported for some time. Let me know what you think - THX |
👍 very good idea What about calling it app.json instead? The json file includes general app configuration and metadata |
sorry but there is no real improvement in using json beside being cooler. Let´s stay with the current format please in invest the time in bugfixing and features please :-) |
besides the fact that implementing the xml parsing for these new dependency entries there sill some hours be lost for implementation and testing - but as you command: we will stay with the format Any please bare in mind: I will never propose any thing just because of being cooler! |
i have to 👍 The idea of transitioning to json as well. Maybe in the future though, its sooo much easier and faster to both parse and write than xml. |
<dependencies>
<dependency mode="hard" type="module" os="linux"
name="imap" doc-link="https://doc.owncloud.org/....">
<info>The PHP module 'imap' is required to access your email boxes.</info>
</dependency>
</dependencies> Why do we have the os tag and type? If we require an OS we could do <dependencies>
<dependency mode="hard" type="os" name="linux">
<info>Linux is required</info>
</dependency>
</dependencies> |
The os-attribute is available to restrict an dependency to an platform. At least this was the intention - no idea if we really need that. As an example: on MAC we require a certain php module which is not necessary of others. |
Some inspiration <php version=">=5.4">
<databases>
<database version="*">pgsql</database>
<database>sqlite3</database>
<database>mysql</database>
</databases>
<libs>
<lib version="*">curl</lib>
<lib version=">=2.7.8">libxml</lib>
<lib>SimpleXML</lib>
</libs> Whenever version is not given, * is assumed |
and since <require*> is not in a dependencies tag i see no need to put this into a separate tag |
looks like an easy structure ... thx for the inspiration |
fixed with 8.0 -> close |
Apps can have dependencies in order to operate properly. We distinguish between hard and soft dependencies.
Hard dependencies are an explicit requirement without such an dependency being available we shall not allow the app to be installed.
Soft dependencies can enable additional functionalists which are not required we shall notify the admin before installation about missing optional dependencies but installation shall still be possible.
In addition to list dependencies on each individual app there has to be an overview page which will list all dependencies.
App dependencies will be listed in the info.xml using following schema:
The attribute 'os' is used for specifying that this requirement is valid for. Can be either linux, win or mac
Available types:
The text was updated successfully, but these errors were encountered: