Expand description
A Module pairs a parsed manifest with the directory it loaded
from and the path through the lockfile that locates its dependency
entries.
Carrying these together fixes two ambiguities that a bare
Manifest cannot resolve on its own:
- A relative
LocalPathinmodule.jsonis relative to that file, not to the process’s current working directory.Module::rootis the directory to rebase against. - Lockfile lookups must be scoped to the consumer’s branch of the nested
dependenciestree, not searched globally. TheModule::lockfile_scopefield records the chain of dependency names from the top-level consumer down to this module.
See crate::lockfile for how the scope is consumed by lookups.
Structs§
- Module
- A WDL module, pairing its parsed
Manifest, the directory on disk that holds themodule.jsonfile, and the lockfile scope that locates the module’s entry within a top-level lockfile. - Module
Id - A cheap identity for a
Modulethat combines its root directory with its lockfile scope.
Functions§
- is_
module_ root - Returns
truewhendircontains amodule.jsonfile at its root (i.e.,diris the on-disk location of a WDL module).