Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit 95b90ef

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Add eden client to ProjectBuildFileParserOptions
Summary: So it could be used in eden globber. Reviewed By: xavierd fbshipit-source-id: db1edec1bd8f19ca59bfdebeee1cd09d9b37da7a
1 parent ac01f20 commit 95b90ef

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/com/facebook/buck/parser/DefaultProjectBuildFileParserFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public ProjectBuildFileParser createFileParser(
9898
knownRuleTypesProvider.getNativeRuleTypes(cell).getPerFeatureProviders())
9999
.setWatchman(watchman)
100100
.setWatchmanQueryTimeoutMs(parserConfig.getWatchmanQueryTimeoutMs())
101+
.setEdenClient(edenClient)
101102
.setRawConfig(
102103
cell.getBuckConfig().getView(ConfigIgnoredByDaemon.class).getRawConfigForParser())
103104
.setImplicitNativeRulesState(parserConfig.getImplicitNativeRulesState())

src/com/facebook/buck/parser/options/BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ java_immutables_library(
1616
"//src/com/facebook/buck/io/watchman:watchman",
1717
"//src/com/facebook/buck/util:util",
1818
"//third-party/java/guava:guava",
19+
"//src/com/facebook/buck/edenfs:edenfs",
1920
],
2021
exported_deps = [
2122
"//src/com/facebook/buck/parser/implicit:implicit",

src/com/facebook/buck/parser/options/ProjectBuildFileParserOptions.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.facebook.buck.core.filesystems.FileName;
2323
import com.facebook.buck.core.rules.providers.impl.BuiltInProvider;
2424
import com.facebook.buck.core.util.immutables.BuckStyleValueWithBuilder;
25+
import com.facebook.buck.edenfs.EdenClientResourcePool;
2526
import com.facebook.buck.io.file.PathMatcher;
2627
import com.facebook.buck.io.watchman.Watchman;
2728
import com.facebook.buck.io.watchman.WatchmanError;
@@ -35,6 +36,7 @@
3536
import org.immutables.value.Value;
3637

3738
@BuckStyleValueWithBuilder
39+
@SuppressWarnings("immutables:untype")
3840
public abstract class ProjectBuildFileParserOptions {
3941
public abstract AbsPath getProjectRoot();
4042

@@ -72,6 +74,11 @@ public Watchman getWatchman() {
7274

7375
public abstract Optional<Long> getWatchmanQueryTimeoutMs();
7476

77+
@Value.Default
78+
public Optional<EdenClientResourcePool> getEdenClient() {
79+
return Optional.empty();
80+
}
81+
7582
public abstract ImmutableSet<BuiltInProvider<?>> getPerFeatureProviders();
7683

7784
@Value.Default

0 commit comments

Comments
 (0)