Artifact 7690f09f7fb8b48ee45fcb282a6e094c82df8becad1d010c6788486ae3248983:

Wiki page [depends] by mario on 2018-07-04 13:41:39.
D 2018-07-04T13:41:39.674
L depends
N text/x-markdown
P c14a4b47029651663180bf1ffd99e3d8eb4faf19bcdc06c4c1fe13efe3cbb6ee
U mario
W 1680
## # depends:

Lists other plugins or language/system libraries which the current plugin requires:

    # depends: corefuncs, json_io, bin:bash

Each entry is a plugin [basename](wiki/id), and indicates it must be available/active alongside.

  * The recommended field name is "depends" and not "require" - for parity with the Debian packaging spec, and because it sounds less stringent.

  * Not every application would want to enforce this *strictly*. Because dynamic languages can soft-detect dependencies usually.

  * Within a plugin management UI, the depends: list could be used for installation warnings. 


## Versioned dependencies

Additionally the plugin names can be suffixed with a version comparison:

    # depends: core (>= 2.0.0)

Which obviously does require the plugin manager to be somewhat more involved. You'll often get away just implementing a `>=` check. Most other version expression gimmicks are likely overkill for simple applicatiion-level features.


## System/language dependencies

While a `TYPE:name` entry can reference other scopes (instead of application-local plugins)

| `bin:imagemagick` | for binaries |
| `python:lxml` | for language modules |
| `sys:amd64` | for the architecture. |
| `deb:anacron` | as hint for the system package manager. |
| `api:archnemesis` | see [api](wiki/api) ]

This is quite informal still. There's also less practical value to implement theese complex dependency lookups, or these exact ones. This is just the advised syntax.


## Related fields

Depending on complexity other fields might be used alongside:

  * `# provides:`
  * `# conflicts:`
  * `# suggests:`

Z 00a69a3f7e4995e7e3632c8a19b82d7d