Search in sources :

Example 41 with FakeBuildRuleParamsBuilder

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

the class OmnibusTest method excludedAndIncludedDeps.

@Test
public void excludedAndIncludedDeps() throws NoSuchBuildTargetException {
    NativeLinkable a = new OmnibusNode("//:a");
    NativeLinkable b = new OmnibusSharedOnlyNode("//:b");
    NativeLinkTarget root = new OmnibusRootNode("//:root", ImmutableList.of(a, b));
    // Verify the spec.
    Omnibus.OmnibusSpec spec = Omnibus.buildSpec(CxxPlatformUtils.DEFAULT_PLATFORM, ImmutableList.of(root), ImmutableList.of());
    assertThat(spec.getGraph().getNodes(), Matchers.containsInAnyOrder(a.getBuildTarget()));
    assertThat(spec.getBody().keySet(), Matchers.containsInAnyOrder(a.getBuildTarget()));
    assertThat(spec.getRoots().keySet(), Matchers.containsInAnyOrder(root.getBuildTarget()));
    assertThat(spec.getDeps().keySet(), Matchers.containsInAnyOrder(b.getBuildTarget()));
    assertThat(spec.getExcluded().keySet(), Matchers.containsInAnyOrder(b.getBuildTarget()));
    // Verify the libs.
    BuildRuleResolver resolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    ImmutableMap<String, SourcePath> libs = toSonameMap(Omnibus.getSharedLibraries(new FakeBuildRuleParamsBuilder(BuildTargetFactory.newInstance("//:rule")).build(), resolver, ruleFinder, CxxPlatformUtils.DEFAULT_CONFIG, CxxPlatformUtils.DEFAULT_PLATFORM, ImmutableList.of(), ImmutableList.of(root), ImmutableList.of()));
    assertThat(libs.keySet(), Matchers.containsInAnyOrder(root.getBuildTarget().toString(), b.getBuildTarget().toString(), "libomnibus.so"));
    assertCxxLinkContainsNativeLinkableInput(getCxxLinkRule(ruleFinder, libs.get(root.getBuildTarget().toString())), pathResolver, root.getNativeLinkTargetInput(CxxPlatformUtils.DEFAULT_PLATFORM), b.getNativeLinkableInput(CxxPlatformUtils.DEFAULT_PLATFORM, Linker.LinkableDepType.SHARED));
    assertThat(libs.get(b.getBuildTarget().toString()), Matchers.not(Matchers.instanceOf(ExplicitBuildTargetSourcePath.class)));
    assertCxxLinkContainsNativeLinkableInput(getCxxLinkRule(ruleFinder, libs.get("libomnibus.so")), pathResolver, a.getNativeLinkableInput(CxxPlatformUtils.DEFAULT_PLATFORM, Linker.LinkableDepType.STATIC_PIC));
}
Also used : FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Test(org.junit.Test)

Example 42 with FakeBuildRuleParamsBuilder

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

the class OmnibusTest method excludedDepExcludesTransitiveDep.

@Test
public void excludedDepExcludesTransitiveDep() throws NoSuchBuildTargetException {
    NativeLinkable a = new OmnibusNode("//:a");
    NativeLinkable b = new OmnibusNode("//:b");
    NativeLinkable c = new OmnibusSharedOnlyNode("//:c", ImmutableList.of(b));
    NativeLinkTarget root = new OmnibusRootNode("//:root", ImmutableList.of(a, c));
    // Verify the spec.
    Omnibus.OmnibusSpec spec = Omnibus.buildSpec(CxxPlatformUtils.DEFAULT_PLATFORM, ImmutableList.of(root), ImmutableList.of());
    assertThat(spec.getGraph().getNodes(), Matchers.containsInAnyOrder(a.getBuildTarget()));
    assertThat(spec.getBody().keySet(), Matchers.containsInAnyOrder(a.getBuildTarget()));
    assertThat(spec.getRoots().keySet(), Matchers.containsInAnyOrder(root.getBuildTarget()));
    assertThat(spec.getDeps().keySet(), Matchers.containsInAnyOrder(c.getBuildTarget()));
    assertThat(spec.getExcluded().keySet(), Matchers.containsInAnyOrder(b.getBuildTarget(), c.getBuildTarget()));
    // Verify the libs.
    BuildRuleResolver resolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    ImmutableMap<String, SourcePath> libs = toSonameMap(Omnibus.getSharedLibraries(new FakeBuildRuleParamsBuilder(BuildTargetFactory.newInstance("//:rule")).build(), resolver, ruleFinder, CxxPlatformUtils.DEFAULT_CONFIG, CxxPlatformUtils.DEFAULT_PLATFORM, ImmutableList.of(), ImmutableList.of(root), ImmutableList.of()));
    assertThat(libs.keySet(), Matchers.containsInAnyOrder(root.getBuildTarget().toString(), b.getBuildTarget().toString(), c.getBuildTarget().toString(), "libomnibus.so"));
    assertCxxLinkContainsNativeLinkableInput(getCxxLinkRule(ruleFinder, libs.get(root.getBuildTarget().toString())), pathResolver, root.getNativeLinkTargetInput(CxxPlatformUtils.DEFAULT_PLATFORM), c.getNativeLinkableInput(CxxPlatformUtils.DEFAULT_PLATFORM, Linker.LinkableDepType.SHARED));
    assertThat(libs.get(b.getBuildTarget().toString()), Matchers.not(Matchers.instanceOf(ExplicitBuildTargetSourcePath.class)));
    assertThat(libs.get(c.getBuildTarget().toString()), Matchers.not(Matchers.instanceOf(ExplicitBuildTargetSourcePath.class)));
    assertCxxLinkContainsNativeLinkableInput(getCxxLinkRule(ruleFinder, libs.get("libomnibus.so")), pathResolver, a.getNativeLinkableInput(CxxPlatformUtils.DEFAULT_PLATFORM, Linker.LinkableDepType.STATIC_PIC));
}
Also used : FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Test(org.junit.Test)

Example 43 with FakeBuildRuleParamsBuilder

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

the class OmnibusTest method depOfExcludedRoot.

@Test
public void depOfExcludedRoot() throws NoSuchBuildTargetException {
    NativeLinkable a = new OmnibusNode("//:a");
    NativeLinkTarget root = new OmnibusRootNode("//:root", ImmutableList.of(a));
    NativeLinkable b = new OmnibusNode("//:b");
    NativeLinkable excludedRoot = new OmnibusNode("//:excluded_root", ImmutableList.of(b));
    // Verify the spec.
    Omnibus.OmnibusSpec spec = Omnibus.buildSpec(CxxPlatformUtils.DEFAULT_PLATFORM, ImmutableList.of(root), ImmutableList.of(excludedRoot));
    assertThat(spec.getGraph().getNodes(), Matchers.containsInAnyOrder(a.getBuildTarget()));
    assertThat(spec.getBody().keySet(), Matchers.containsInAnyOrder(a.getBuildTarget()));
    assertThat(spec.getRoots().keySet(), Matchers.containsInAnyOrder(root.getBuildTarget()));
    assertThat(spec.getDeps().keySet(), Matchers.empty());
    assertThat(spec.getExcluded().keySet(), Matchers.containsInAnyOrder(excludedRoot.getBuildTarget(), b.getBuildTarget()));
    // Verify the libs.
    BuildRuleResolver resolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    ImmutableMap<String, SourcePath> libs = toSonameMap(Omnibus.getSharedLibraries(new FakeBuildRuleParamsBuilder(BuildTargetFactory.newInstance("//:rule")).build(), resolver, ruleFinder, CxxPlatformUtils.DEFAULT_CONFIG, CxxPlatformUtils.DEFAULT_PLATFORM, ImmutableList.of(), ImmutableList.of(root), ImmutableList.of(excludedRoot)));
    assertThat(libs.keySet(), Matchers.containsInAnyOrder(root.getBuildTarget().toString(), excludedRoot.getBuildTarget().toString(), b.getBuildTarget().toString(), "libomnibus.so"));
    assertCxxLinkContainsNativeLinkableInput(getCxxLinkRule(ruleFinder, libs.get(root.getBuildTarget().toString())), pathResolver, root.getNativeLinkTargetInput(CxxPlatformUtils.DEFAULT_PLATFORM));
    assertThat(libs.get(excludedRoot.getBuildTarget().toString()), Matchers.not(Matchers.instanceOf(ExplicitBuildTargetSourcePath.class)));
    assertThat(libs.get(b.getBuildTarget().toString()), Matchers.not(Matchers.instanceOf(ExplicitBuildTargetSourcePath.class)));
    assertCxxLinkContainsNativeLinkableInput(getCxxLinkRule(ruleFinder, libs.get("libomnibus.so")), pathResolver, a.getNativeLinkableInput(CxxPlatformUtils.DEFAULT_PLATFORM, Linker.LinkableDepType.STATIC_PIC));
}
Also used : FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Test(org.junit.Test)

Example 44 with FakeBuildRuleParamsBuilder

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

the class DefaultJavaLibraryTest method createDefaultJavaLibraryRuleWithAbiKey.

private BuildRule createDefaultJavaLibraryRuleWithAbiKey(BuildTarget buildTarget, ImmutableSet<String> srcs, ImmutableSortedSet<BuildRule> deps, ImmutableSortedSet<BuildRule> exportedDeps, Optional<AbstractJavacOptions.SpoolMode> spoolMode, ImmutableList<String> postprocessClassesCommands) {
    ProjectFilesystem projectFilesystem = new FakeProjectFilesystem();
    ImmutableSortedSet<? extends SourcePath> srcsAsPaths = FluentIterable.from(srcs).transform(Paths::get).transform(p -> new PathSourcePath(projectFilesystem, p)).toSortedSet(Ordering.natural());
    BuildRuleParams buildRuleParams = new FakeBuildRuleParamsBuilder(buildTarget).setDeclaredDeps(ImmutableSortedSet.copyOf(deps)).build();
    JavacOptions javacOptions = spoolMode.isPresent() ? JavacOptions.builder(DEFAULT_JAVAC_OPTIONS).setSpoolMode(spoolMode.get()).build() : DEFAULT_JAVAC_OPTIONS;
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(ruleResolver);
    DefaultJavaLibrary defaultJavaLibrary = new DefaultJavaLibrary(buildRuleParams, new SourcePathResolver(ruleFinder), ruleFinder, srcsAsPaths, /* resources */
    ImmutableSet.of(), javacOptions.getGeneratedSourceFolderName(), /* proguardConfig */
    Optional.empty(), postprocessClassesCommands, exportedDeps, /* providedDeps */
    ImmutableSortedSet.of(), ImmutableSortedSet.of(), javacOptions.trackClassUsage(), /* additionalClasspathEntries */
    ImmutableSet.of(), new JavacToJarStepFactory(javacOptions, JavacOptionsAmender.IDENTITY), /* resourcesRoot */
    Optional.empty(), /* manifest file */
    Optional.empty(), /* mavenCoords */
    Optional.empty(), /* tests */
    ImmutableSortedSet.of(), /* classesToRemoveFromJar */
    ImmutableSet.of()) {
    };
    ruleResolver.addToIndex(defaultJavaLibrary);
    return defaultJavaLibrary;
}
Also used : FakeBuildContext(com.facebook.buck.rules.FakeBuildContext) StepRunner(com.facebook.buck.step.StepRunner) ActionGraph(com.facebook.buck.rules.ActionGraph) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) InputBasedRuleKeyFactory(com.facebook.buck.rules.keys.InputBasedRuleKeyFactory) RichStream(com.facebook.buck.util.RichStream) GenruleBuilder(com.facebook.buck.shell.GenruleBuilder) Ansi(com.facebook.buck.util.Ansi) Assert.assertThat(org.junit.Assert.assertThat) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) ByteArrayInputStream(java.io.ByteArrayInputStream) RuleKey(com.facebook.buck.rules.RuleKey) FluentIterable(com.google.common.collect.FluentIterable) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Assert.fail(org.junit.Assert.fail) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) Splitter(com.google.common.base.Splitter) Path(java.nio.file.Path) JavaPackageFinder(com.facebook.buck.jvm.core.JavaPackageFinder) AndroidPlatformTarget(com.facebook.buck.android.AndroidPlatformTarget) Verbosity(com.facebook.buck.util.Verbosity) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) AndroidLibraryBuilder(com.facebook.buck.android.AndroidLibraryBuilder) TargetGraph(com.facebook.buck.rules.TargetGraph) Set(java.util.Set) DefaultFileHashCache(com.facebook.buck.util.cache.DefaultFileHashCache) DEFAULT_JAVAC_OPTIONS(com.facebook.buck.jvm.java.JavaCompilationConstants.DEFAULT_JAVAC_OPTIONS) BuildTarget(com.facebook.buck.model.BuildTarget) StandardCharsets(java.nio.charset.StandardCharsets) List(java.util.List) EasyMock.createNiceMock(org.easymock.EasyMock.createNiceMock) Matchers.equalTo(org.hamcrest.Matchers.equalTo) PathSourcePath(com.facebook.buck.rules.PathSourcePath) Optional(java.util.Optional) Matchers.is(org.hamcrest.Matchers.is) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) ZipOutputStream(java.util.zip.ZipOutputStream) Iterables(com.google.common.collect.Iterables) Step(com.facebook.buck.step.Step) SourcePath(com.facebook.buck.rules.SourcePath) Hashing(com.google.common.hash.Hashing) FakeBuildableContext(com.facebook.buck.rules.FakeBuildableContext) BuckEventBusFactory(com.facebook.buck.event.BuckEventBusFactory) BuildRule(com.facebook.buck.rules.BuildRule) ExecutionContext(com.facebook.buck.step.ExecutionContext) LinkOption(java.nio.file.LinkOption) FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) MoreAsserts(com.facebook.buck.testutil.MoreAsserts) ImmutableList(com.google.common.collect.ImmutableList) AllExistingProjectFilesystem(com.facebook.buck.testutil.AllExistingProjectFilesystem) NoSuchBuildTargetException(com.facebook.buck.parser.NoSuchBuildTargetException) TestExecutionContext(com.facebook.buck.step.TestExecutionContext) BuildTargetFactory(com.facebook.buck.model.BuildTargetFactory) DefaultRuleKeyFactory(com.facebook.buck.rules.keys.DefaultRuleKeyFactory) Suppliers(com.google.common.base.Suppliers) EasyMock.replay(org.easymock.EasyMock.replay) Nullable(javax.annotation.Nullable) MoreCollectors(com.facebook.buck.util.MoreCollectors) Before(org.junit.Before) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) Charsets(com.google.common.base.Charsets) Assert.assertNotNull(org.junit.Assert.assertNotNull) TargetNode(com.facebook.buck.rules.TargetNode) FakeFileHashCache(com.facebook.buck.testutil.FakeFileHashCache) Assert.assertTrue(org.junit.Assert.assertTrue) Matchers(org.hamcrest.Matchers) Test(org.junit.Test) IOException(java.io.IOException) EasyMock.expect(org.easymock.EasyMock.expect) HashingDeterministicJarWriter(com.facebook.buck.io.HashingDeterministicJarWriter) Console(com.facebook.buck.util.Console) EasyMock(org.easymock.EasyMock) HumanReadableException(com.facebook.buck.util.HumanReadableException) File(java.io.File) DefaultBuildTargetSourcePath(com.facebook.buck.rules.DefaultBuildTargetSourcePath) StackedFileHashCache(com.facebook.buck.util.cache.StackedFileHashCache) Rule(org.junit.Rule) Ordering(com.google.common.collect.Ordering) Paths(java.nio.file.Paths) TargetGraphFactory(com.facebook.buck.testutil.TargetGraphFactory) FileHashCache(com.facebook.buck.util.cache.FileHashCache) BuildContext(com.facebook.buck.rules.BuildContext) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) TemporaryFolder(org.junit.rules.TemporaryFolder) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) AllExistingProjectFilesystem(com.facebook.buck.testutil.AllExistingProjectFilesystem) Paths(java.nio.file.Paths)

Example 45 with FakeBuildRuleParamsBuilder

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

the class JavaBinaryTest method testGetExecutableCommand.

@Test
public void testGetExecutableCommand() throws Exception {
    // prebuilt_jar //third_party/generator:generator
    PrebuiltJarBuilder.createBuilder(BuildTargetFactory.newInstance("//third_party/generator:generator")).setBinaryJar(PATH_TO_GENERATOR_JAR).build();
    // prebuilt_jar //third_party/guava:guava
    TargetNode<?, ?> guavaNode = PrebuiltJarBuilder.createBuilder(BuildTargetFactory.newInstance("//third_party/guava:guava")).setBinaryJar(PATH_TO_GUAVA_JAR).build();
    // java_library //java/com/facebook/base:base
    TargetNode<?, ?> libraryNode = JavaLibraryBuilder.createBuilder(BuildTargetFactory.newInstance("//java/com/facebook/base:base")).addSrc(Paths.get("java/com/facebook/base/Base.java")).addDep(guavaNode.getBuildTarget()).build();
    TargetGraph targetGraph = TargetGraphFactory.newInstance(guavaNode, libraryNode);
    BuildRuleResolver ruleResolver = new BuildRuleResolver(targetGraph, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(ruleResolver));
    BuildRule libraryRule = ruleResolver.requireRule(libraryNode.getBuildTarget());
    BuildRuleParams params = new FakeBuildRuleParamsBuilder(BuildTargetFactory.newInstance("//java/com/facebook/base:Main")).setDeclaredDeps(ImmutableSortedSet.of(libraryRule)).build();
    // java_binary //java/com/facebook/base:Main
    JavaBinary javaBinary = ruleResolver.addToIndex(new JavaBinary(params, new ExternalJavaRuntimeLauncher("/foobar/java"), "com.facebook.base.Main", null, /* merge manifests */
    true, null, /* blacklist */
    ImmutableSet.of(), ImmutableSet.of(), ImmutableSet.of(), /* cache */
    true));
    // Strip the trailing "." from the absolute path to the current directory.
    final String basePath = new File(".").getAbsolutePath().replaceFirst("\\.$", "");
    // Each classpath entry is specified via its absolute path so that the executable command can be
    // run from a /tmp directory, if necessary.
    String expectedClasspath = basePath + pathResolver.getRelativePath(javaBinary.getSourcePathToOutput());
    List<String> expectedCommand = ImmutableList.of("/foobar/java", "-jar", expectedClasspath);
    assertEquals(expectedCommand, javaBinary.getExecutableCommand().getCommandPrefix(pathResolver));
    assertFalse("Library rules that are used exclusively by genrules should not be part of the classpath.", expectedClasspath.contains(PATH_TO_GENERATOR_JAR.toString()));
}
Also used : TargetGraph(com.facebook.buck.rules.TargetGraph) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) BuildRule(com.facebook.buck.rules.BuildRule) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) File(java.io.File) Test(org.junit.Test)

Aggregations

FakeBuildRuleParamsBuilder (com.facebook.buck.rules.FakeBuildRuleParamsBuilder)108 BuildRuleResolver (com.facebook.buck.rules.BuildRuleResolver)102 DefaultTargetNodeToBuildRuleTransformer (com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer)102 Test (org.junit.Test)94 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)87 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)78 BuildTarget (com.facebook.buck.model.BuildTarget)77 BuildRuleParams (com.facebook.buck.rules.BuildRuleParams)74 FakeSourcePath (com.facebook.buck.rules.FakeSourcePath)50 FakeProjectFilesystem (com.facebook.buck.testutil.FakeProjectFilesystem)32 SourcePath (com.facebook.buck.rules.SourcePath)30 BuildRule (com.facebook.buck.rules.BuildRule)27 Path (java.nio.file.Path)26 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)25 FakeBuildRule (com.facebook.buck.rules.FakeBuildRule)22 PathSourcePath (com.facebook.buck.rules.PathSourcePath)18 Step (com.facebook.buck.step.Step)17 RuleKey (com.facebook.buck.rules.RuleKey)16 FakeBuildableContext (com.facebook.buck.rules.FakeBuildableContext)15 ExecutionContext (com.facebook.buck.step.ExecutionContext)14