pub trait Resolver:
Debug
+ Send
+ Sync {
// Required methods
fn materialize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer: &'life1 Module,
path: &'life2 SymbolicPath,
) -> Pin<Box<dyn Future<Output = Result<MaterializedFile, ResolverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn resolve_tree<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer: &'life1 Module,
) -> Pin<Box<dyn Future<Output = Result<ResolvedTree, ResolverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn discover_versions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 DependencyName,
source: &'life2 DependencySource,
scope: DependencyScope,
) -> Pin<Box<dyn Future<Output = Result<Vec<Version>, ResolverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Resolves WDL module imports to concrete files on disk.
Required Methods§
Sourcefn materialize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer: &'life1 Module,
path: &'life2 SymbolicPath,
) -> Pin<Box<dyn Future<Output = Result<MaterializedFile, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn materialize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer: &'life1 Module,
path: &'life2 SymbolicPath,
) -> Pin<Box<dyn Future<Output = Result<MaterializedFile, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Materializes a single symbolic import on disk and returns the path to the resulting file.
The primary call site for wdl-analysis. When the analyzer
encounters a symbolic import like import openwdl/csvkit/cut, it
asks the resolver for the file path that statement should route
to, then parses the result with the existing import machinery as
if the user had written import "<that path>".
consumer is the importing module: its manifest declares the
symbolic path’s head component, and its root rebases any
relative LocalPath dependencies. path is the parsed
symbolic path. The resolver looks up the head component in
consumer.manifest.dependencies, materializes the dep’s module
folder if not yet cached, and resolves either the manifest’s
entrypoint (when the symbolic path has no sub-path) or
<sub-path>.wdl under the module folder.
Sourcefn resolve_tree<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer: &'life1 Module,
) -> Pin<Box<dyn Future<Output = Result<ResolvedTree, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_tree<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer: &'life1 Module,
) -> Pin<Box<dyn Future<Output = Result<ResolvedTree, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolves every transitive dependency declared by consumer.
Walks consumer.manifest.dependencies, recurses into each dep’s
own manifest, and records every module visited along the way.
Relative LocalPath entries are resolved against the declaring
module’s root. Detects cycles.
Sourcefn discover_versions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 DependencyName,
source: &'life2 DependencySource,
scope: DependencyScope,
) -> Pin<Box<dyn Future<Output = Result<Vec<Version>, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn discover_versions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 DependencyName,
source: &'life2 DependencySource,
scope: DependencyScope,
) -> Pin<Box<dyn Future<Output = Result<Vec<Version>, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists discovered versions for a dependency source that satisfy the requirement, in descending semver order.
Used by CLI commands that surface available versions to the user
and internally by resolve_tree to select the version a Git dep
resolves to.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".