Search in sources :

Example 1 with SrcRootsFinder

use of com.facebook.buck.jvm.java.SrcRootsFinder in project buck by facebook.

the class MissingSymbolsHandler method create.

public static MissingSymbolsHandler create(ProjectFilesystem projectFilesystem, ImmutableSet<Description<?>> descriptions, BuckConfig config, BuckEventBus buckEventBus, Console console, JavacOptions javacOptions, ImmutableMap<String, String> environment) {
    SrcRootsFinder srcRootsFinder = new SrcRootsFinder(projectFilesystem);
    ParserConfig parserConfig = config.getView(ParserConfig.class);
    PythonBuckConfig pythonBuckConfig = new PythonBuckConfig(config, new ExecutableFinder());
    ProjectBuildFileParserFactory projectBuildFileParserFactory = new DefaultProjectBuildFileParserFactory(ProjectBuildFileParserOptions.builder().setProjectRoot(projectFilesystem.getRootPath()).setPythonInterpreter(pythonBuckConfig.getPythonInterpreter()).setAllowEmptyGlobs(parserConfig.getAllowEmptyGlobs()).setIgnorePaths(projectFilesystem.getIgnorePaths()).setBuildFileName(parserConfig.getBuildFileName()).setAutodepsFilesHaveSignatures(config.getIncludeAutodepsSignature()).setDefaultIncludes(parserConfig.getDefaultIncludes()).setDescriptions(descriptions).setBuildFileImportWhitelist(parserConfig.getBuildFileImportWhitelist()).build());
    JavaSymbolFinder javaSymbolFinder = new JavaSymbolFinder(projectFilesystem, srcRootsFinder, javacOptions, new ConstructorArgMarshaller(new DefaultTypeCoercerFactory(ObjectMappers.newDefaultInstance())), projectBuildFileParserFactory, config, buckEventBus, console, environment);
    return new MissingSymbolsHandler(console, javaSymbolFinder, parserConfig.getBuildFileName());
}
Also used : PythonBuckConfig(com.facebook.buck.python.PythonBuckConfig) ExecutableFinder(com.facebook.buck.io.ExecutableFinder) ProjectBuildFileParserFactory(com.facebook.buck.json.ProjectBuildFileParserFactory) DefaultProjectBuildFileParserFactory(com.facebook.buck.json.DefaultProjectBuildFileParserFactory) ConstructorArgMarshaller(com.facebook.buck.rules.ConstructorArgMarshaller) DefaultProjectBuildFileParserFactory(com.facebook.buck.json.DefaultProjectBuildFileParserFactory) JavaSymbolFinder(com.facebook.buck.jvm.java.JavaSymbolFinder) DefaultTypeCoercerFactory(com.facebook.buck.rules.coercer.DefaultTypeCoercerFactory) ParserConfig(com.facebook.buck.parser.ParserConfig) SrcRootsFinder(com.facebook.buck.jvm.java.SrcRootsFinder)

Aggregations

ExecutableFinder (com.facebook.buck.io.ExecutableFinder)1 DefaultProjectBuildFileParserFactory (com.facebook.buck.json.DefaultProjectBuildFileParserFactory)1 ProjectBuildFileParserFactory (com.facebook.buck.json.ProjectBuildFileParserFactory)1 JavaSymbolFinder (com.facebook.buck.jvm.java.JavaSymbolFinder)1 SrcRootsFinder (com.facebook.buck.jvm.java.SrcRootsFinder)1 ParserConfig (com.facebook.buck.parser.ParserConfig)1 PythonBuckConfig (com.facebook.buck.python.PythonBuckConfig)1 ConstructorArgMarshaller (com.facebook.buck.rules.ConstructorArgMarshaller)1 DefaultTypeCoercerFactory (com.facebook.buck.rules.coercer.DefaultTypeCoercerFactory)1