Overview

Artifact ID: 4b12ddaf6a222cc458e53b74ba92492b2db9ce350043fe3c3d5669b2abf1abf4
Page Name:depends
Date: 2018-07-05 14:30:43
Original User: mario
Mimetype:text/x-markdown
Parent: 1db4aaff112adb318caa0d61a507477ab918f9b53fad9e4c317edc3b313de533 (diff)
Next 3c6f35255c8a2590b3412a0bb4434dd235465b639603b74267d04ef8eec33a13
Content

# depends:

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

# depends: corefuncs, json_io, bin:bash

Each entry is a plugin basename, 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.

It's optional, and might be treated as documentation in some implementations.

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 references

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

bin:imagemagick verify a binary exists
python:lxml for language modules
sys:amd64 e.g. the architecture.
deb:anacron as hint for the system package manager.
api:archnemesis see api

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

One could implement a few "magic" basenames as well. For instance checking the current language version with just # depends: python (>= 3.4), or if feasible check for module versions php:sqlite (>= 3.24).

Related fields

Depending on complexity other fields might be used alongside:

  • # provides:
  • # conflicts:
  • # suggests: