Skip to main content

Module packages

Module packages 

Source
Expand description

Macro packages: reusable macros from another project (e.g. dre_utils), declared under packages: in the project’s root dependencies.yml or packages.yml:

packages:
  - git: https://github.com/acme/dre-finance-macros.git
    revision: v2.3.0          # tag, branch or commit
  - local: ../shared/macros   # a folder on disk, read in place

A package is a folder with a dre_package.yml (name:) and a macros/ folder. dre deps clones git packages into dre_deps/packages/<name> and pins the commit in dre.lock. Their macros are called through the package’s name: {{ dre_utils.star_except(...) }}.

Structs§

Declared
Package
An installed package, ready to use.

Enums§

Source

Constants§

DEPENDENCY_FILES
Root files that may declare packages: (and plugins, like any YAML file).
PACKAGE_FILE

Functions§

declared
Every packages: entry in the root dependency files. Problems go to diags.
declared_extensions
The extensions: entries of the root dependency files: unique valid names, exact versions.
resolve
Resolve the declared packages to installed folders and their macro files.
sync
Install missing or outdated git packages into dre_deps/packages/ and pin them in dre.lock. With install false, report what’s missing instead. Local packages need nothing.
valid_extension_name
Whether name can name an extension (and its executable): ASCII letters, digits, -, _.

Type Aliases§

DispatchOrder
dispatch: in dre_project.yml: per macro namespace, where dispatch() looks and in what order. Unlisted namespaces search the root project first, then the namespace itself.