Resolve transient dependencies for any number of checks.
    If you want to do this en masse, put `all`.
964502
def resolve(checks, lazy, quiet):
    
    root = get_root()
    if 'all' in checks:
        checks = os.listdir(root)

    for check_name in sorted(checks):
        pinned_reqs_file = os.path.join(root, check_name, 'requirements.in')
        resolved_reqs_file = os.path.join(root, check_name, 'requirements.txt')

        if os.path.isfile(pinned_reqs_file):
            if not quiet:
                echo_info('Check `{}`:'.format(check_name))

            if not quiet:
                echo_waiting('    Resolving dependencies...')

            pre_packages = read_packages(resolved_reqs_file)
            result = resolve_requirements(pinned_reqs_file, resolved_reqs_file, lazy=lazy)
            if result.code:
                abort(result.stdout + result.stderr)

            if not quiet:
                post_packages = read_packages(resolved_reqs_file)
                display_package_changes(pre_packages, post_packages, indent='    ')
900706
function resolveTransitiveDependencies(module, hash) {
    if (!(module instanceof Module)) {
      return Promise.reject("Unable to resolve module of type " + typeof(module));
    }

    var promises = [];
    for (var i in module.dependencies) {
      (function(dependencyName) {

        /* Ignore already resolved dependencies */
        if (hash[dependencyName]) return;

        /* Get a module or a promise to it and put it in the hash NOW! */
        var dependency = hash[dependencyName] = moduleOrPromise(dependencyName);

        /* Transitively resolve the dependency */
        promises.push(Promise.resolve(dependency).then(function(dependency) {
          hash[dependencyName] = dependency;
          return resolveTransitiveDependencies(dependency, hash);
        }));

      })(module.dependencies[i]);
    }

    return Promise.all(promises).then(function() {
      return hash;
    });
  }
954108
def apply_dependencies(self):
        
        for host in self:
            for parent_id in getattr(host, 'parents', []):
                if parent_id is None:
                    continue
                parent = self[parent_id]
                if parent.active_checks_enabled:
                    # Add parent in the list
                    host.act_depend_of.append((parent_id, ['d', 'x', 's', 'f'], '', True))

                    # Add child in the parent
                    parent.act_depend_of_me.append((host.uuid, ['d', 'x', 's', 'f'], '', True))

                    # And add the parent/child dep filling too, for broking
                    parent.child_dependencies.add(host.uuid)
                    host.parent_dependencies.add(parent_id)
540262
def check_dependencies(req, indent=1, history=None):
    
    # keep a history to avoid infinite loops
    if history is None:
        history = set()
    if req in history:
        return
    history.add(req)
    d = pkg_resources.get_distribution(req)
    extras = parse_extras(req)
    if indent == 1:
        print_package(req, 0)
    for r in d.requires(extras=extras):
        print_package(r, indent)
        check_dependencies(r, indent + 1, history)
905511
function checkDependencies(req, res) {
                    var modelName = req.params.modelName,
                        id = req.params.documentId,
                        models = _.pluck(registry.models, 'model');

                    dependencies.check(models, modelName, id, function (err, depPair) {
                        if (err) throw err;
                        if (_.isEmpty(depPair)) return res.json(200, []);
                        var deps = depPair[1];
                        var lines = dependencies.depsToLines(deps);
                        return res.json(200, lines);
                    });
                }
287095
def apply_dependencies(self, hosts):
        
        for service in self:
            if service.host and service.host_dependency_enabled:
                host = hosts[service.host]
                if host.active_checks_enabled:
                    service.act_depend_of.append(
                        (service.host, ['d', 'x', 's', 'f'], '', True)
                    )
                    host.act_depend_of_me.append(
                        (service.uuid, ['d', 'x', 's', 'f'], '', True)
                    )
                    host.child_dependencies.add(service.uuid)
                    service.parent_dependencies.add(service.host)
9829
def _get_all_refs(self, dep, handled_refs=None):
        
        if handled_refs is None:
            handled_refs = [dep]
        else:
            if dep in handled_refs:
                return []
        res = []
        if dep in self.future_values_key_item:
            res.extend(
                self.future_values_key_item[dep]["dependencies"].values())
            add = []
            for h_d in res:
                add.extend(self._get_all_refs(h_d, handled_refs))
            res.extend(add)
        return list(set(res))
931587
void onCompletion(Collection<ApplicationDependency> dependencies) {
        if (!dependencies.isEmpty()) {
            for (ApplicationDependency dependency : dependencies) {
                dependency.onCompletion(this);
            }
        }
    }
114530
def _resolve_deps(self, depmap):
    """"""
    deps = defaultdict(lambda: OrderedSet())
    for category, depspecs in depmap.items():
      dependencies = deps[category]
      for depspec in depspecs:
        dep_address = Address.parse(depspec)
        try:
          self.context.build_graph.maybe_inject_address_closure(dep_address)
          dependencies.add(self.context.build_graph.get_target(dep_address))
        except AddressLookupError as e:
          raise AddressLookupError('{}\n  referenced from {} scope'.format(e, self.options_scope))
    return deps
7683
def dependencies(self):
	
		
		
		try:
			for dep_name in self.__prof.dependencies(self.name()):
				yield self.__comp_stub_reg.get(dep_name)
		except TypeError:
			yield from ()
1096021
def resolve_dependency(str)
      # Optimize for the most common scheme to
      # save 22k allocations on an average Spree app.
      scheme = if str.start_with?('file-digest:'.freeze)
        'file-digest'.freeze
      else
        str[/([^:]+)/, 1]
      end

      if resolver = config[:dependency_resolvers][scheme]
        resolver.call(self, str)
      else
        nil
      end
    end
495092
def resolve_dependencies(self, to_build, depender):
		
		shutit_global.shutit_global_object.yield_to_draw()
		self.log('In resolve_dependencies',level=logging.DEBUG)
		cfg = self.cfg
		for dependee_id in depender.depends_on:
			dependee = self.shutit_map.get(dependee_id)
			# Don't care if module doesn't exist, we check this later
			if (dependee and dependee not in to_build
			    and cfg[dependee_id]['shutit.core.module.build_ifneeded']):
				to_build.append(dependee)
				cfg[dependee_id]['shutit.core.module.build'] = True
		return True
677498
function (dependencies) {
            this._dependsOn = dependencies[this._name] || [];
            this._dependencyOf = [];
            Object.keys(dependencies).forEach(function (name) {
                var nameDependencies = dependencies[name];
                if (nameDependencies.indexOf(this._name) !== NOT_FOUND) {
                    this._dependencyOf.push(name);
                }
            }, this);
        }
352030
def resolve(self, *pargs, **kwargs):
        """"""
        self._cached = (pargs, kwargs)
        self._try_then()
447724
def dependencies(source):
    """"""
    loader = ClassLoader(source, max_cache=-1)
    all_dependencies = set()
    for klass in loader.classes:
        new_dependencies = loader.dependencies(klass) - all_dependencies
        all_dependencies.update(new_dependencies)
        for new_dep in new_dependencies:
            click.echo(new_dep)
70335
public void compileAll() {
        if (this.generatedClassList.isEmpty()) {
            this.errorHandlers.clear();
            return;
        }
        final String[] classes = new String[this.generatedClassList.size()];
        this.generatedClassList.toArray(classes);

        File dumpDir = this.configuration.getPackageBuilderConfiguration().getDumpDir();
        if (dumpDir != null) {
            dumpResources(classes,
                          dumpDir);
        }

        final CompilationResult result = this.compiler.compile(classes,
                                                               this.src,
                                                               this.packageStoreWrapper,
                                                               rootClassLoader);


        //this will sort out the errors based on what class/file they happened in
        if (result.getErrors().length > 0) {
            for (int i = 0; i < result.getErrors().length; i++) {
                final CompilationProblem err = result.getErrors()[i];
                final ErrorHandler handler = this.errorHandlers.get(err.getFileName());
                handler.addError(err);
            }

            final Collection errors = this.errorHandlers.values();
            for (Object error : errors) {
                final ErrorHandler handler = (ErrorHandler) error;
                if (handler.isInError()) {
                    this.results.add(handler.getError());
                }
            }
        }

        // We've compiled everthing, so clear it for the next set of additions
        this.generatedClassList.clear();
        this.errorHandlers.clear();
    }
153917
def _resolve_deps(name, pkgs, **kwargs):
    '''
    
    '''
    missing_deps = []
    for pkg_file in pkgs:
        deb = apt.debfile.DebPackage(filename=pkg_file, cache=apt.Cache())
        if deb.check():
            missing_deps.extend(deb.missing_deps)

    if missing_deps:
        cmd = ['apt-get', '-q', '-y']
        cmd = cmd + ['-o', 'DPkg::Options::=--force-confold']
        cmd = cmd + ['-o', 'DPkg::Options::=--force-confdef']
        cmd.append('install')
        cmd.extend(missing_deps)

        ret = __salt__['cmd.retcode'](
            cmd,
            env=kwargs.get('env'),
            python_shell=False
        )

        if ret != 0:
            raise CommandExecutionError(
                'Error: unable to resolve dependencies for: {0}'.format(name)
            )
        else:
            try:
                cmd = ['apt-mark', 'auto'] + missing_deps
                __salt__['cmd.run'](
                    cmd,
                    env=kwargs.get('env'),
                    python_shell=False
                )
            except MinionError as exc:
                raise CommandExecutionError(exc)
    return