This module implements predicates to load, consult, and compile Manifest.pl files. A Manifest file allows the specification of a bundle:
The dependencies are given with depends(Deps), where each element is a bundle name or Bundle-Props. The properties are:
An optional dependency is active when it is present, enabled (if it has an enabled configuration flag), and accepted by the hook optional_dep_active/1 of the bundle, if it defines one (e.g., a reduced version of the bundle may accept none). The hooks of a bundle can generate its configuration facts for its active optional dependencies with generate_config_auto/2 (see builder_aux), and a host builds only its active fragments.
Use make_bundlereg/3 for processing of Manifest.pl files into bundle registry entries. Bundle registries are written using fastrw so that the support code to load them is minimal. They include cheaper runtime meta-information (like dependencies, versions, path aliases, etc.).
For registered bundles, you can use ensure_load_manifest/1 and manifest_call/2 for loading and consulting a bundle specification.
Usage:is_bundledir(BundleDir)
BundleDir is the directory for a bundle (i.e., contains a Manifest.pl file
Usage:manifest_bundle_name(BundleDir,Bundle)
Bundle is the name declared in the manifest of the bundle at BundleDir (its first sentence, :- bundle(Bundle)). Fails with an error message if there is none.
Usage:lookup_bundle_root(File,BundleDir)
Detect the bundle root dir for the given File (a directory or normal file)
Usage:ensure_load_manifest(Target)
Ensure that the manifest for Target is loaded (including Manifest sentences and .hooks.pl modules). The bundle must have been scanned before, so that its source directory is known.
Usage:manifest_call(Target,Head)
Call Target:Head, a member of (a trait of the alias) bundledef for the bundle or item Target (a fact of its Manifest or a clause of its hooks; see obj_invoke/3)
Usage:manifest_current_predicate(Target,Head)
Head is declared in Target (see obj_defines/3)
Usage:make_bundlereg(Bundle,BundleDir,RegFile)
Generate a bundlereg RegFile for bundle Bundle at BundleDir. It has no path to the bundle, which is found by name (see internals:bundle_lookup/3), and its alias paths are relative to the bundle (as in the manifest), so that it does not depend on where the workspace or the bundle is.
Usage:bundle_info_src(Bundle)
Show the source directory of Bundle (one line, for tools)
Usage:bundle_info(Bundle)
Show info of Bundle