resolves the dependencies of this build target and builds it
199260
def resolve_and_build(self):
        
        pdebug("resolving and building task '%s'" % self.name,
                groups=["build_task"])
        indent_text(indent="++2")
        toret = self.build(**self.resolve_dependencies())
        indent_text(indent="--2")
        return toret
132292
def resolve_dependencies(self):
        
        return dict(
            [((key, self.data_dependencies[key])
                if type(self.data_dependencies[key]) != DeferredDependency
                else (key, self.data_dependencies[key].resolve()))
             for key in self.data_dependencies])
1181489
def resolve_dependency(dependency)
      @dependencies[dependency.name] ||= dependency

      dependency
        .source
        .versions(
          dependency.constraints,
          @identifier.initial_elm_version,
          !@options[:skip_update],
          @options[:only_update]
        )
        .each do |version|
          next if @graph.artifact?(dependency.name, version)
          resolve_dependencies(dependency, version)
        end

      nil
    end
495809
def depend_on(path)
      if environment.absolute_path?(path) && environment.stat(path)
        @dependencies << environment.build_file_digest_uri(path)
      else
        resolve(path)
      end
      nil
    end
71376
function() {
            var dependencies = Array.prototype.slice.call(arguments),
                dfd = $.Deferred();
            
            for (var i = 0; i < dependencies.length; i++) {
                dependencies[i] = this.basePath + dependencies[i];
            }
            
            require(dependencies, function() {
                dfd.resolve.apply(dfd, arguments);
            });
            
            return dfd.promise();
        }
571268
def raise_unresolved_targets(build_context, conf, unknown_seeds, seed_refs):
    """"""

    def format_target(target_name):
        # TODO: suggest similar known target names
        build_module = split_build_module(target_name)
        return '{} (in {})'.format(target_name,
                                   conf.get_build_file_path(build_module))

    def format_unresolved(seed):
        if seed not in seed_refs:
            return seed
        seed_ref = seed_refs[seed]
        reasons = []
        if seed_ref.on_cli:
            reasons.append('seen on command line')
        if seed_ref.from_default:
            reasons.append('specified as default target in {}'
                           .format(conf.get_project_build_file))
        if seed_ref.dep_of:
            reasons.append(
                'dependency of ' +
                ', '.join(format_target(target_name)
                          for target_name in sorted(seed_ref.dep_of)))
        if seed_ref.buildenv_of:
            reasons.append(
                'buildenv of ' +
                ', '.join(format_target(target_name)
                          for target_name in sorted(seed_ref.buildenv_of)))

        return '{} - {}'.format(seed, ', '.join(reasons))

    unresolved_str = '\n'.join(format_unresolved(target_name)
                               for target_name in sorted(unknown_seeds))
    num_target_str = '{} target'.format(len(unknown_seeds))
    if len(unknown_seeds) > 1:
        num_target_str += 's'
    raise ValueError('Could not resolve {}:\n{}'
                     .format(num_target_str, unresolved_str))
1330057
public function install()
    {
        $type = $this->typeResolver->resolve();
        if (!isset($this->mapping[$type])) {
            return;
        }

        foreach ($this->mapping[$type] as $package) {
            if (!$this->isPackageRequired($package['name'])) {
                $this->io->write(
                    sprintf('Requiring package %s', $package['name'])
                );

                $this->installer->installPackage(
                    $package['name'],
                    $package['version']
                );
            }
        }
    }
558526
private static void resolveDependencies(Collection<ArtifactSpec> collection, ShrinkwrapArtifactResolvingHelper helper) {
        // Identify the artifact specs that need resolution.
        // Ideally, there should be none at this point.
        collection.forEach(spec -> {
            if (spec.file == null) {
                // Resolve it.
                ArtifactSpec resolved = helper.resolve(spec);
                if (resolved != null) {
                    spec.file = resolved.file;
                } else {
                    throw new IllegalStateException("Unable to resolve artifact: " + spec.toString());
                }
            }
        });
    }
207012
def apply_dependencies(self):
        
        self.hosts.apply_dependencies()
        self.services.apply_dependencies(self.hosts)
22926
def build_task(current_target):
    

    target = current_target.config
    try:
        builder = _make_builder(target, current_target)
        build_path = _get_build_path(target, builder)
        if not os.path.exists(build_path):
            os.makedirs(build_path)
        builder.configure(src_dir=target.get("dp.src_dir"), build_dir=build_path)
        builder.build(build_dir=build_path)
        no_install = devpipeline_core.toolsupport.choose_tool_key(
            current_target, _NO_INSTALL_KEYS
        )
        if no_install not in target:
            install_path = target.get(
                devpipeline_core.toolsupport.choose_tool_key(
                    current_target, _INSTALL_PATH_KEYS
                ),
                fallback="install",
            )
            builder.install(build_dir=build_path, install_dir=install_path)
            _find_file_paths(target, os.path.join(build_path, install_path))
    except devpipeline_core.toolsupport.MissingToolKey as mtk:
        current_target.executor.warning(mtk)
755603
def prepare_for_build(self):
        '''
        '''
        assert(self.target is not None)
        if hasattr(self.target, '_build_prepared'):
            return

        self.info('Preparing build')

        self.info('Check requirements for {0}'.format(self.targetname))
        self.target.check_requirements()

        self.info('Install platform')
        self.target.install_platform()

        self.info('Check application requirements')
        self.check_application_requirements()

        self.info('Check garden requirements')
        self.check_garden_requirements()

        self.info('Compile platform')
        self.target.compile_platform()

        # flag to prevent multiple build
        self.target._build_prepared = True
530189
@Override
    protected ResolutionResult resolveDependencies(String projectFolder, String topLevelFolder, Set<String> bomFiles) {
        boolean installSuccess = true;
        Collection<DependencyInfo> dependencyInfos = new LinkedList<>();
        Collection<String> directDependencies = new LinkedList<>();
        File composerLock = new File(topLevelFolder + FORWARD_SLASH + COMPOSER_LOCK);

        // run pre step according to phpPreStep flag
        if (phpPreStep) {
            installSuccess = !executePreStepCommand(topLevelFolder);
        } else {
            if (!composerLock.exists()) {
                logger.warn("Could not find {} file in {}. Please execute {} {} first.", COMPOSER_LOCK, topLevelFolder, COMPOSER, INSTALL);
            }
        }
        if (installSuccess && composerLock.exists()) {
            try {
                Map<String, Object> requireMap = new HashMap<>();
                InputStream is = new FileInputStream(topLevelFolder + FORWARD_SLASH + COMPOSER_JSON);
                String jsonText = IOUtils.toString(is);
                JSONObject json = new JSONObject(jsonText);
                if (json.has(REQUIRE)) {
                    JSONObject require = json.getJSONObject(REQUIRE);
                    requireMap = require.toMap();
                }
                if (includeDevDependencies) {
                    if (json.has(REQUIRE_DEV)) {
                        JSONObject requireDev = json.getJSONObject(REQUIRE_DEV);
                        Map<String, Object> requireDevMap = requireDev.toMap();
                        requireMap.putAll(requireDevMap);
                    }
                }
                if (!requireMap.isEmpty()) {
                    if (requireMap.containsKey(PHP)) {
                        requireMap.remove(PHP);
                    }
                    directDependencies.addAll(requireMap.keySet());
                }

            } catch (IOException e) {
                logger.error("Didn't succeed to read {} - {} ", COMPOSER_JSON, e.getMessage());
            }
        }

        if (!directDependencies.isEmpty()) {
            try {
                JsonReader jsonReader = new JsonReader(new FileReader(topLevelFolder + FORWARD_SLASH + COMPOSER_LOCK));
                PhpModel phpModel = new Gson().fromJson(jsonReader, PhpModel.class);
                Collection<PhpPackage> phpPackages = phpModel.getPhpPackages();
                if (includeDevDependencies) {
                    phpPackages.addAll(phpModel.getPhpPackagesDev());
                }
                if (!phpPackages.isEmpty()) {
                    dependencyInfos = createDependencyInfos(phpPackages, dependencyInfos, directDependencies);
                } else {
                    logger.debug("The file {} is empty", COMPOSER_LOCK);
                }
            } catch (IOException e) {
                logger.error(e.getMessage());
            }
        }
        return new ResolutionResult(dependencyInfos, getExcludes(), getDependencyType(), topLevelFolder);
    }
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);
        }
96147
def missing_dependencies
      missing = []
      dependency_versions(:recursive => false).each do |pkg, target_versions|
        found = false
        target_versions.each do |_target, versions|
          dependency = dependency_for(pkg)
          found = versions.any? { |version| dependency.match?(pkg, version) }
        end
        missing << pkg unless found
      end
      missing
    end
477799
def register_with_context(self, myname, context):
        

        if self.context is not None:
            raise Exception("attempted to register BuildTarget with multiple "
                            "BuildContexts")

        context.register_task(myname, self)
        self._name = myname
        self.context = context

        for key in self.data_dependencies:
            if type(self.data_dependencies[key]) is DeferredDependency:
                self.data_dependencies[key].parent  = myname
                self.data_dependencies[key].context = context
                for tnmame in self.data_dependencies[key].target_names:
                    context.register_dependency(tnmame, myname)
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)
821715
protected final void buildResolved(ResolvedMacro c, BuilderT builder, Context context)
    {
        Component processed = c.getFormatter().process(c.getInput(), context, c.getArguments());
        buildAny(processed, builder, context);
    }