Search in sources :

Example 71 with SourcePathResolver

use of com.facebook.buck.rules.SourcePathResolver in project buck by facebook.

the class JavaBuildGraphProcessor method run.

/**
   * Creates the appropriate target graph and other resources needed for the {@link Processor} and
   * runs it. This method will take responsibility for cleaning up the executor service after it
   * runs.
   */
static void run(final CommandRunnerParams params, final AbstractCommand command, final Processor processor) throws ExitCodeException, InterruptedException, IOException {
    final ConcurrencyLimit concurrencyLimit = command.getConcurrencyLimit(params.getBuckConfig());
    try (CommandThreadManager pool = new CommandThreadManager(command.getClass().getName(), concurrencyLimit)) {
        Cell cell = params.getCell();
        WeightedListeningExecutorService executorService = pool.getExecutor();
        // Ideally, we should be able to construct the TargetGraph quickly assuming most of it is
        // already in memory courtesy of buckd. Though we could make a performance optimization where
        // we pass an option to buck.py that tells it to ignore reading the BUCK.autodeps files when
        // parsing the BUCK files because we never need to consider the existing auto-generated deps
        // when creating the new auto-generated deps. If we did so, we would have to make sure to keep
        // the nodes for that version of the graph separate from the ones that are actually used for
        // building.
        TargetGraph graph;
        try {
            graph = params.getParser().buildTargetGraphForTargetNodeSpecs(params.getBuckEventBus(), cell, command.getEnableParserProfiling(), executorService, ImmutableList.of(TargetNodePredicateSpec.of(x -> true, BuildFileSpec.fromRecursivePath(Paths.get(""), cell.getRoot()))), /* ignoreBuckAutodepsFiles */
            true).getTargetGraph();
        } catch (BuildTargetException | BuildFileParseException e) {
            params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
            throw new ExitCodeException(1);
        }
        BuildRuleResolver buildRuleResolver = new BuildRuleResolver(graph, new DefaultTargetNodeToBuildRuleTransformer());
        CachingBuildEngineBuckConfig cachingBuildEngineBuckConfig = params.getBuckConfig().getView(CachingBuildEngineBuckConfig.class);
        LocalCachingBuildEngineDelegate cachingBuildEngineDelegate = new LocalCachingBuildEngineDelegate(params.getFileHashCache());
        BuildEngine buildEngine = new CachingBuildEngine(cachingBuildEngineDelegate, executorService, executorService, new DefaultStepRunner(), CachingBuildEngine.BuildMode.SHALLOW, cachingBuildEngineBuckConfig.getBuildDepFiles(), cachingBuildEngineBuckConfig.getBuildMaxDepFileCacheEntries(), cachingBuildEngineBuckConfig.getBuildArtifactCacheSizeLimit(), params.getObjectMapper(), buildRuleResolver, cachingBuildEngineBuckConfig.getResourceAwareSchedulingInfo(), new RuleKeyFactoryManager(params.getBuckConfig().getKeySeed(), fs -> cachingBuildEngineDelegate.getFileHashCache(), buildRuleResolver, cachingBuildEngineBuckConfig.getBuildInputRuleKeyFileSizeLimit(), new DefaultRuleKeyCache<>()));
        // Create a BuildEngine because we store symbol information as build artifacts.
        BuckEventBus eventBus = params.getBuckEventBus();
        ExecutionContext executionContext = ExecutionContext.builder().setConsole(params.getConsole()).setConcurrencyLimit(concurrencyLimit).setBuckEventBus(eventBus).setEnvironment(/* environment */
        ImmutableMap.of()).setExecutors(ImmutableMap.<ExecutorPool, ListeningExecutorService>of(ExecutorPool.CPU, executorService)).setJavaPackageFinder(params.getJavaPackageFinder()).setObjectMapper(params.getObjectMapper()).setPlatform(params.getPlatform()).setCellPathResolver(params.getCell().getCellPathResolver()).build();
        SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(buildRuleResolver));
        BuildEngineBuildContext buildContext = BuildEngineBuildContext.builder().setBuildContext(BuildContext.builder().setActionGraph(new ActionGraph(ImmutableList.of())).setSourcePathResolver(pathResolver).setJavaPackageFinder(executionContext.getJavaPackageFinder()).setEventBus(eventBus).build()).setClock(params.getClock()).setArtifactCache(params.getArtifactCacheFactory().newInstance()).setBuildId(eventBus.getBuildId()).setObjectMapper(params.getObjectMapper()).setEnvironment(executionContext.getEnvironment()).setKeepGoing(false).build();
        // Traverse the TargetGraph to find all of the auto-generated dependencies.
        JavaDepsFinder javaDepsFinder = JavaDepsFinder.createJavaDepsFinder(params.getBuckConfig(), params.getCell().getCellPathResolver(), params.getObjectMapper(), buildContext, executionContext, buildEngine);
        processor.process(graph, javaDepsFinder, executorService);
    }
}
Also used : BuckEventBus(com.facebook.buck.event.BuckEventBus) ActionGraph(com.facebook.buck.rules.ActionGraph) TargetNodePredicateSpec(com.facebook.buck.parser.TargetNodePredicateSpec) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) MoreExceptions(com.facebook.buck.util.MoreExceptions) ConsoleEvent(com.facebook.buck.event.ConsoleEvent) ExecutionContext(com.facebook.buck.step.ExecutionContext) ImmutableList(com.google.common.collect.ImmutableList) LocalCachingBuildEngineDelegate(com.facebook.buck.rules.LocalCachingBuildEngineDelegate) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) DefaultStepRunner(com.facebook.buck.step.DefaultStepRunner) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) ConcurrencyLimit(com.facebook.buck.util.concurrent.ConcurrencyLimit) CachingBuildEngineBuckConfig(com.facebook.buck.rules.CachingBuildEngineBuckConfig) BuildFileParseException(com.facebook.buck.json.BuildFileParseException) Cell(com.facebook.buck.rules.Cell) WeightedListeningExecutorService(com.facebook.buck.util.concurrent.WeightedListeningExecutorService) BuildFileSpec(com.facebook.buck.parser.BuildFileSpec) DefaultRuleKeyCache(com.facebook.buck.rules.keys.DefaultRuleKeyCache) ImmutableMap(com.google.common.collect.ImmutableMap) TargetGraph(com.facebook.buck.rules.TargetGraph) BuildTargetException(com.facebook.buck.model.BuildTargetException) IOException(java.io.IOException) CachingBuildEngine(com.facebook.buck.rules.CachingBuildEngine) JavaDepsFinder(com.facebook.buck.jvm.java.autodeps.JavaDepsFinder) BuildEngineBuildContext(com.facebook.buck.rules.BuildEngineBuildContext) Paths(java.nio.file.Paths) ExecutorPool(com.facebook.buck.step.ExecutorPool) BuildEngine(com.facebook.buck.rules.BuildEngine) BuildContext(com.facebook.buck.rules.BuildContext) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) RuleKeyFactoryManager(com.facebook.buck.rules.keys.RuleKeyFactoryManager) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) BuckEventBus(com.facebook.buck.event.BuckEventBus) JavaDepsFinder(com.facebook.buck.jvm.java.autodeps.JavaDepsFinder) DefaultRuleKeyCache(com.facebook.buck.rules.keys.DefaultRuleKeyCache) TargetGraph(com.facebook.buck.rules.TargetGraph) RuleKeyFactoryManager(com.facebook.buck.rules.keys.RuleKeyFactoryManager) WeightedListeningExecutorService(com.facebook.buck.util.concurrent.WeightedListeningExecutorService) BuildFileParseException(com.facebook.buck.json.BuildFileParseException) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) DefaultStepRunner(com.facebook.buck.step.DefaultStepRunner) BuildEngineBuildContext(com.facebook.buck.rules.BuildEngineBuildContext) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Cell(com.facebook.buck.rules.Cell) BuildTargetException(com.facebook.buck.model.BuildTargetException) ConcurrencyLimit(com.facebook.buck.util.concurrent.ConcurrencyLimit) LocalCachingBuildEngineDelegate(com.facebook.buck.rules.LocalCachingBuildEngineDelegate) ActionGraph(com.facebook.buck.rules.ActionGraph) CachingBuildEngine(com.facebook.buck.rules.CachingBuildEngine) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) CachingBuildEngine(com.facebook.buck.rules.CachingBuildEngine) BuildEngine(com.facebook.buck.rules.BuildEngine) ExecutionContext(com.facebook.buck.step.ExecutionContext) ExecutorPool(com.facebook.buck.step.ExecutorPool) WeightedListeningExecutorService(com.facebook.buck.util.concurrent.WeightedListeningExecutorService) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) CachingBuildEngineBuckConfig(com.facebook.buck.rules.CachingBuildEngineBuckConfig)

Example 72 with SourcePathResolver

use of com.facebook.buck.rules.SourcePathResolver in project buck by facebook.

the class BuildCommand method showOutputs.

private void showOutputs(CommandRunnerParams params, ActionGraphAndResolver actionGraphAndResolver) {
    Optional<DefaultRuleKeyFactory> ruleKeyFactory = Optional.empty();
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(actionGraphAndResolver.getResolver());
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    if (showRuleKey) {
        RuleKeyFieldLoader fieldLoader = new RuleKeyFieldLoader(params.getBuckConfig().getKeySeed());
        ruleKeyFactory = Optional.of(new DefaultRuleKeyFactory(fieldLoader, params.getFileHashCache(), pathResolver, ruleFinder));
    }
    params.getConsole().getStdOut().println("The outputs are:");
    for (BuildTarget buildTarget : buildTargets) {
        try {
            BuildRule rule = actionGraphAndResolver.getResolver().requireRule(buildTarget);
            Optional<Path> outputPath = TargetsCommand.getUserFacingOutputPath(pathResolver, rule, showFullOutput, params.getBuckConfig().getBuckOutCompatLink());
            params.getConsole().getStdOut().printf("%s%s%s\n", rule.getFullyQualifiedName(), showRuleKey ? " " + ruleKeyFactory.get().build(rule).toString() : "", showOutput || showFullOutput ? " " + outputPath.map(Object::toString).orElse("") : "");
        } catch (NoSuchBuildTargetException e) {
            throw new HumanReadableException(MoreExceptions.getHumanReadableOrLocalizedMessage(e));
        }
    }
}
Also used : RuleKeyFieldLoader(com.facebook.buck.rules.keys.RuleKeyFieldLoader) Path(java.nio.file.Path) SourcePath(com.facebook.buck.rules.SourcePath) DefaultRuleKeyFactory(com.facebook.buck.rules.keys.DefaultRuleKeyFactory) BuildTarget(com.facebook.buck.model.BuildTarget) HumanReadableException(com.facebook.buck.util.HumanReadableException) NoSuchBuildTargetException(com.facebook.buck.parser.NoSuchBuildTargetException) BuildRule(com.facebook.buck.rules.BuildRule) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver)

Example 73 with SourcePathResolver

use of com.facebook.buck.rules.SourcePathResolver in project buck by facebook.

the class BuildCommand method processSuccessfulBuild.

private int processSuccessfulBuild(CommandRunnerParams params, ActionAndTargetGraphs graphs) throws IOException {
    if (showOutput || showFullOutput || showRuleKey) {
        showOutputs(params, graphs.actionGraph);
    }
    if (outputPathForSingleBuildTarget != null) {
        BuildTarget loneTarget = Iterables.getOnlyElement(graphs.getTargetGraphForLocalBuild().getBuildTargets());
        BuildRule rule = graphs.actionGraph.getResolver().getRule(loneTarget);
        if (!rule.outputFileCanBeCopied()) {
            params.getConsole().printErrorText(String.format("%s does not have an output that is compatible with `buck build --out`", loneTarget));
            return 1;
        } else {
            SourcePath output = Preconditions.checkNotNull(rule.getSourcePathToOutput(), "%s specified a build target that does not have an output file: %s", OUT_LONG_ARG, loneTarget);
            ProjectFilesystem projectFilesystem = rule.getProjectFilesystem();
            SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(graphs.actionGraph.getResolver()));
            projectFilesystem.copyFile(pathResolver.getAbsolutePath(output), outputPathForSingleBuildTarget);
        }
    }
    return 0;
}
Also used : SourcePath(com.facebook.buck.rules.SourcePath) BuildTarget(com.facebook.buck.model.BuildTarget) BuildRule(com.facebook.buck.rules.BuildRule) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder)

Example 74 with SourcePathResolver

use of com.facebook.buck.rules.SourcePathResolver in project buck by facebook.

the class CxxLibraryDescription method createSharedLibraryInterface.

private static <A extends Arg> BuildRule createSharedLibraryInterface(BuildRuleParams baseParams, BuildRuleResolver resolver, CxxPlatform cxxPlatform) throws NoSuchBuildTargetException {
    BuildTarget baseTarget = baseParams.getBuildTarget();
    Optional<SharedLibraryInterfaceFactory> factory = cxxPlatform.getSharedLibraryInterfaceFactory();
    if (!factory.isPresent()) {
        throw new HumanReadableException("%s: C/C++ platform %s does not support shared library interfaces", baseTarget, cxxPlatform.getFlavor());
    }
    CxxLink sharedLibrary = (CxxLink) resolver.requireRule(baseTarget.withAppendedFlavors(cxxPlatform.getFlavor(), Type.SHARED.getFlavor()));
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    return factory.get().createSharedInterfaceLibrary(baseTarget.withAppendedFlavors(Type.SHARED_INTERFACE.getFlavor(), cxxPlatform.getFlavor()), baseParams, resolver, pathResolver, ruleFinder, sharedLibrary.getSourcePathToOutput());
}
Also used : BuildTarget(com.facebook.buck.model.BuildTarget) HumanReadableException(com.facebook.buck.util.HumanReadableException) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver)

Example 75 with SourcePathResolver

use of com.facebook.buck.rules.SourcePathResolver in project buck by facebook.

the class CxxLibraryDescription method createBuildRule.

public <A extends Arg> BuildRule createBuildRule(final BuildRuleParams params, final BuildRuleResolver resolver, final A args, Optional<Linker.LinkableDepType> linkableDepType, final Optional<SourcePath> bundleLoader, ImmutableSet<BuildTarget> blacklist) throws NoSuchBuildTargetException {
    BuildTarget buildTarget = params.getBuildTarget();
    // See if we're building a particular "type" and "platform" of this library, and if so, extract
    // them from the flavors attached to the build target.
    Optional<Map.Entry<Flavor, Type>> type = getLibType(buildTarget);
    Optional<CxxPlatform> platform = cxxPlatforms.getValue(buildTarget);
    if (params.getBuildTarget().getFlavors().contains(CxxCompilationDatabase.COMPILATION_DATABASE)) {
        // XXX: This needs bundleLoader for tests..
        CxxPlatform cxxPlatform = platform.orElse(defaultCxxPlatform);
        SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
        SourcePathResolver sourcePathResolver = new SourcePathResolver(ruleFinder);
        BuildRuleParams paramsWithoutFlavor = params.withoutFlavor(CxxCompilationDatabase.COMPILATION_DATABASE);
        ImmutableMap<CxxPreprocessAndCompile, SourcePath> objects = requireObjects(paramsWithoutFlavor, resolver, sourcePathResolver, ruleFinder, cxxBuckConfig, cxxPlatform, CxxSourceRuleFactory.PicType.PIC, args);
        return CxxCompilationDatabase.createCompilationDatabase(params, objects.keySet());
    } else if (params.getBuildTarget().getFlavors().contains(CxxCompilationDatabase.UBER_COMPILATION_DATABASE)) {
        return CxxDescriptionEnhancer.createUberCompilationDatabase(platform.isPresent() ? params : params.withAppendedFlavor(defaultCxxPlatform.getFlavor()), resolver);
    } else if (params.getBuildTarget().getFlavors().contains(CxxInferEnhancer.InferFlavors.INFER.get())) {
        return CxxInferEnhancer.requireInferAnalyzeAndReportBuildRuleForCxxDescriptionArg(params, resolver, cxxBuckConfig, platform.orElse(defaultCxxPlatform), args, inferBuckConfig, new CxxInferSourceFilter(inferBuckConfig));
    } else if (params.getBuildTarget().getFlavors().contains(CxxInferEnhancer.InferFlavors.INFER_ANALYZE.get())) {
        return CxxInferEnhancer.requireInferAnalyzeBuildRuleForCxxDescriptionArg(params, resolver, cxxBuckConfig, platform.orElse(defaultCxxPlatform), args, inferBuckConfig, new CxxInferSourceFilter(inferBuckConfig));
    } else if (params.getBuildTarget().getFlavors().contains(CxxInferEnhancer.InferFlavors.INFER_CAPTURE_ALL.get())) {
        return CxxInferEnhancer.requireAllTransitiveCaptureBuildRules(params, resolver, cxxBuckConfig, platform.orElse(defaultCxxPlatform), inferBuckConfig, new CxxInferSourceFilter(inferBuckConfig), args);
    } else if (params.getBuildTarget().getFlavors().contains(CxxInferEnhancer.InferFlavors.INFER_CAPTURE_ONLY.get())) {
        return CxxInferEnhancer.requireInferCaptureAggregatorBuildRuleForCxxDescriptionArg(params, resolver, cxxBuckConfig, platform.orElse(defaultCxxPlatform), args, inferBuckConfig, new CxxInferSourceFilter(inferBuckConfig));
    } else if (type.isPresent() && !platform.isPresent()) {
        BuildRuleParams untypedParams = getUntypedParams(params);
        switch(type.get().getValue()) {
            case EXPORTED_HEADERS:
                Optional<CxxPreprocessables.HeaderMode> mode = HEADER_MODE.getValue(params.getBuildTarget());
                if (mode.isPresent()) {
                    return createExportedHeaderSymlinkTreeBuildRule(untypedParams, resolver, mode.get(), args);
                }
                break;
            // $CASES-OMITTED$
            default:
        }
    } else if (type.isPresent() && platform.isPresent()) {
        // If we *are* building a specific type of this lib, call into the type specific
        // rule builder methods.
        BuildRuleParams untypedParams = getUntypedParams(params);
        switch(type.get().getValue()) {
            case HEADERS:
                return createHeaderSymlinkTreeBuildRule(untypedParams, resolver, platform.get(), args);
            case EXPORTED_HEADERS:
                return createExportedPlatformHeaderSymlinkTreeBuildRule(untypedParams, resolver, platform.get(), args);
            case SHARED:
                return createSharedLibraryBuildRule(untypedParams, resolver, cxxBuckConfig, platform.get(), args, Linker.LinkType.SHARED, linkableDepType.orElse(Linker.LinkableDepType.SHARED), Optional.empty(), blacklist);
            case SHARED_INTERFACE:
                return createSharedLibraryInterface(untypedParams, resolver, platform.get());
            case MACH_O_BUNDLE:
                return createSharedLibraryBuildRule(untypedParams, resolver, cxxBuckConfig, platform.get(), args, Linker.LinkType.MACH_O_BUNDLE, linkableDepType.orElse(Linker.LinkableDepType.SHARED), bundleLoader, blacklist);
            case STATIC:
                return createStaticLibraryBuildRule(untypedParams, resolver, cxxBuckConfig, platform.get(), args, CxxSourceRuleFactory.PicType.PDC);
            case STATIC_PIC:
                return createStaticLibraryBuildRule(untypedParams, resolver, cxxBuckConfig, platform.get(), args, CxxSourceRuleFactory.PicType.PIC);
            case SANDBOX_TREE:
                return CxxDescriptionEnhancer.createSandboxTreeBuildRule(resolver, args, platform.get(), untypedParams);
        }
        throw new RuntimeException("unhandled library build type");
    }
    boolean hasObjectsForAnyPlatform = !args.srcs.isEmpty();
    Predicate<CxxPlatform> hasObjects;
    if (hasObjectsForAnyPlatform) {
        hasObjects = x -> true;
    } else {
        hasObjects = input -> !args.platformSrcs.getMatchingValues(input.getFlavor().toString()).isEmpty();
    }
    Predicate<CxxPlatform> hasExportedHeaders;
    if (!args.exportedHeaders.isEmpty()) {
        hasExportedHeaders = x -> true;
    } else {
        hasExportedHeaders = input -> !args.exportedPlatformHeaders.getMatchingValues(input.getFlavor().toString()).isEmpty();
    }
    // Otherwise, we return the generic placeholder of this library, that dependents can use
    // get the real build rules via querying the action graph.
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    final SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    return new CxxLibrary(params, resolver, FluentIterable.from(args.exportedDeps).transform(resolver::getRule), hasExportedHeaders, Predicates.not(hasObjects), input -> {
        ImmutableList<StringWithMacros> flags = CxxFlags.getFlagsWithMacrosWithPlatformMacroExpansion(args.exportedLinkerFlags, args.exportedPlatformLinkerFlags, input);
        return CxxDescriptionEnhancer.toStringWithMacrosArgs(params.getBuildTarget(), params.getCellRoots(), resolver, input, flags);
    }, cxxPlatform -> {
        try {
            return getSharedLibraryNativeLinkTargetInput(params, resolver, pathResolver, ruleFinder, cxxBuckConfig, cxxPlatform, args, CxxFlags.getFlagsWithMacrosWithPlatformMacroExpansion(args.linkerFlags, args.platformLinkerFlags, cxxPlatform), CxxFlags.getFlagsWithMacrosWithPlatformMacroExpansion(args.exportedLinkerFlags, args.exportedPlatformLinkerFlags, cxxPlatform), args.frameworks, args.libraries);
        } catch (NoSuchBuildTargetException e) {
            throw new RuntimeException(e);
        }
    }, args.supportedPlatformsRegex, args.frameworks, args.libraries, args.forceStatic.orElse(false) ? NativeLinkable.Linkage.STATIC : args.preferredLinkage.orElse(NativeLinkable.Linkage.ANY), args.linkWhole.orElse(false), args.soname, args.tests, args.canBeAsset.orElse(false), !params.getBuildTarget().getFlavors().contains(CxxDescriptionEnhancer.EXPORTED_HEADER_SYMLINK_TREE_FLAVOR));
}
Also used : SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) StringWithMacros(com.facebook.buck.rules.macros.StringWithMacros) SourcePath(com.facebook.buck.rules.SourcePath) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) BuildTarget(com.facebook.buck.model.BuildTarget) NoSuchBuildTargetException(com.facebook.buck.parser.NoSuchBuildTargetException)

Aggregations

SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)486 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)468 BuildRuleResolver (com.facebook.buck.rules.BuildRuleResolver)376 DefaultTargetNodeToBuildRuleTransformer (com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer)350 Test (org.junit.Test)330 BuildTarget (com.facebook.buck.model.BuildTarget)228 BuildRule (com.facebook.buck.rules.BuildRule)161 Path (java.nio.file.Path)154 SourcePath (com.facebook.buck.rules.SourcePath)148 FakeProjectFilesystem (com.facebook.buck.testutil.FakeProjectFilesystem)138 FakeSourcePath (com.facebook.buck.rules.FakeSourcePath)126 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)119 PathSourcePath (com.facebook.buck.rules.PathSourcePath)86 BuildRuleParams (com.facebook.buck.rules.BuildRuleParams)82 FakeBuildRuleParamsBuilder (com.facebook.buck.rules.FakeBuildRuleParamsBuilder)79 TargetGraph (com.facebook.buck.rules.TargetGraph)76 RuleKey (com.facebook.buck.rules.RuleKey)72 FakeBuildRule (com.facebook.buck.rules.FakeBuildRule)70 ExecutionContext (com.facebook.buck.step.ExecutionContext)57 ImmutableList (com.google.common.collect.ImmutableList)55