Search in sources :

Example 1 with DoctorInteractiveReport

use of com.facebook.buck.rage.DoctorInteractiveReport in project buck by facebook.

the class DoctorCommand method generateRageReport.

private Optional<DefectSubmitResult> generateRageReport(CommandRunnerParams params, UserInput userInput, BuildLogEntry entry) throws IOException, InterruptedException {
    RageConfig rageConfig = RageConfig.of(params.getBuckConfig());
    VersionControlCmdLineInterfaceFactory vcsFactory = new DefaultVersionControlCmdLineInterfaceFactory(params.getCell().getFilesystem().getRootPath(), new PrintStreamProcessExecutorFactory(), new VersionControlBuckConfig(params.getBuckConfig()), params.getBuckConfig().getEnvironment());
    Optional<WatchmanDiagReportCollector> watchmanDiagReportCollector = WatchmanDiagReportCollector.newInstanceIfWatchmanUsed(params.getCell(), params.getCell().getFilesystem(), new DefaultProcessExecutor(params.getConsole()), new ExecutableFinder(), params.getEnvironment());
    DoctorInteractiveReport report = new DoctorInteractiveReport(new DefaultDefectReporter(params.getCell().getFilesystem(), params.getObjectMapper(), rageConfig, params.getBuckEventBus(), params.getClock()), params.getCell().getFilesystem(), params.getConsole(), userInput, params.getBuildEnvironmentDescription(), VcsInfoCollector.create(vcsFactory.createCmdLineInterface()), rageConfig, new DefaultExtraInfoCollector(rageConfig, params.getCell().getFilesystem(), new DefaultProcessExecutor(params.getConsole())), ImmutableSet.of(entry), watchmanDiagReportCollector);
    return report.collectAndSubmitResult();
}
Also used : VersionControlCmdLineInterfaceFactory(com.facebook.buck.util.versioncontrol.VersionControlCmdLineInterfaceFactory) DefaultVersionControlCmdLineInterfaceFactory(com.facebook.buck.util.versioncontrol.DefaultVersionControlCmdLineInterfaceFactory) ExecutableFinder(com.facebook.buck.io.ExecutableFinder) DefaultProcessExecutor(com.facebook.buck.util.DefaultProcessExecutor) WatchmanDiagReportCollector(com.facebook.buck.rage.WatchmanDiagReportCollector) RageConfig(com.facebook.buck.rage.RageConfig) DefaultVersionControlCmdLineInterfaceFactory(com.facebook.buck.util.versioncontrol.DefaultVersionControlCmdLineInterfaceFactory) VersionControlBuckConfig(com.facebook.buck.util.versioncontrol.VersionControlBuckConfig) DefaultDefectReporter(com.facebook.buck.rage.DefaultDefectReporter) PrintStreamProcessExecutorFactory(com.facebook.buck.util.PrintStreamProcessExecutorFactory) DefaultExtraInfoCollector(com.facebook.buck.rage.DefaultExtraInfoCollector) DoctorInteractiveReport(com.facebook.buck.rage.DoctorInteractiveReport)

Aggregations

ExecutableFinder (com.facebook.buck.io.ExecutableFinder)1 DefaultDefectReporter (com.facebook.buck.rage.DefaultDefectReporter)1 DefaultExtraInfoCollector (com.facebook.buck.rage.DefaultExtraInfoCollector)1 DoctorInteractiveReport (com.facebook.buck.rage.DoctorInteractiveReport)1 RageConfig (com.facebook.buck.rage.RageConfig)1 WatchmanDiagReportCollector (com.facebook.buck.rage.WatchmanDiagReportCollector)1 DefaultProcessExecutor (com.facebook.buck.util.DefaultProcessExecutor)1 PrintStreamProcessExecutorFactory (com.facebook.buck.util.PrintStreamProcessExecutorFactory)1 DefaultVersionControlCmdLineInterfaceFactory (com.facebook.buck.util.versioncontrol.DefaultVersionControlCmdLineInterfaceFactory)1 VersionControlBuckConfig (com.facebook.buck.util.versioncontrol.VersionControlBuckConfig)1 VersionControlCmdLineInterfaceFactory (com.facebook.buck.util.versioncontrol.VersionControlCmdLineInterfaceFactory)1