def resolve_deps(self): assert self._run is not None ctx = deps.ResolutionContext(target_dir=self._run.path, opdef=self.opdef, resource_config=self.resource_config) resolved = deps.resolve(self.opdef.dependencies, ctx) self._run.write_attr("deps", _sort_resolved(resolved)) self._maybe_write_label(resolved)
def _iter_op_resolvers(resource_deps, opdef): ctx = deps.ResolutionContext(None, opdef, {}) for name, dep in resource_deps.items(): res = deps.resources([dep], ctx)[0] for source in res.resdef.sources: source_resolver = resolver.for_resdef_source(source, res) if isinstance(source_resolver, resolver.OperationOutputResolver): yield name, source_resolver
def _resolve_deps(self): assert self._run is not None ctx = deps.ResolutionContext(target_dir=self._run.path, opdef=self.opdef) deps.resolve(self.opdef.dependencies, ctx)