Skip to main content

Module plugins

Module plugins 

Source
Expand description

Finding installed plugin packages.

A project’s plugins live in <project>/dre_deps/plugins, hard-linked (or copied) from a shared download cache in ~/.dre/plugins. DRE_PLUGINS_DIR replaces both. Inside a plugins directory, packages sit side by side by version, <dir>/<package>/<version>/, holding the package’s executable and a MANIFEST naming it and the plugins it provides, as installed by the plugin manager. Executables placed by hand (development, tests) sit flat in the directory: dre-plugin-<package>, or dre-<kind>-<name> for a package of that one plugin, called <name>.

Structs§

InstalledPackage
Located
The executable to start for one plugin, and the plugin to ask it for.
Manifest
An installed version’s MANIFEST.

Enums§

LocateError
Why locate found nothing.

Constants§

DEPS_DIR
Everything a project installs: plugins and macro packages.
MANIFEST
What an installed version’s directory holds besides the executable.

Functions§

cache_dir
The shared download cache, which project installs link from; also where dre init installs before a project exists.
check_uses
Check that a declared package provides every plugin the project uses: from the installed packages, else from dre.lock. A package that’s neither installed nor locked is already an install error, so plugins it might provide aren’t reported again.
discover
Every package under dir, flat ones first, then versioned ones in version order.
find
The installed copies of package name to use: an exact pin if given, otherwise the highest installed version matching req; failing both, the flat (hand-placed) executables of that name. Several only when a package is placed flat as one dre-<kind>-<name> per plugin.
legacy_executable
The executable file name a package installs under when its archive holds a single plugin’s dre-<kind>-<name> (a plugin built before packages).
link_or_copy
Put src at dst without a second copy on disk where possible.
link_version
Link (or copy) an installed version’s directory, executable and manifest, from one plugins directory to another.
locate
Find the plugin id among the project’s declared packages.
locate_in
locate, given the project’s root and declared packages.
override_dir
DRE_PLUGINS_DIR, when set: plugins live and install there, for every project.
plugins_dir
Where a project’s plugins live (None: outside any project, the cache).
probe
The plugins an executable serves, from its name when that’s dre-<kind>-<name>, else from its handshake. Asked once per file and modification time.
read_manifest
version_dir
Where a versioned install of a package lives.
write_manifest