From 958422e77fa0e6a4d0ec4ec43e619322f30497de Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 20 Mar 2018 08:47:12 -0400 Subject: [PATCH] Undo changes to diagnostics engine and import pipeline They didn't seem necessary --- src/diagnostics_engine.cc | 5 +++++ src/import_pipeline.cc | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/diagnostics_engine.cc b/src/diagnostics_engine.cc index 15253d1d..36453ea2 100644 --- a/src/diagnostics_engine.cc +++ b/src/diagnostics_engine.cc @@ -13,6 +13,11 @@ void DiagnosticsEngine::Init(Config* config) { void DiagnosticsEngine::Publish(WorkingFiles* working_files, std::string path, std::vector diagnostics) { + // Cache diagnostics so we can show fixits. + working_files->DoActionOnFile(path, [&](WorkingFile* working_file) { + if (working_file) + working_file->diagnostics_ = diagnostics; + }); int64_t now = std::chrono::duration_cast( diff --git a/src/import_pipeline.cc b/src/import_pipeline.cc index 03d8f47c..3fcff636 100644 --- a/src/import_pipeline.cc +++ b/src/import_pipeline.cc @@ -408,12 +408,6 @@ void ParseFile(Config* config, for (std::unique_ptr& new_index : *indexes) { Timer time; - // Cache diagnostics so we can show fixits. - working_files->DoActionOnFile(path, [&](WorkingFile* working_file) { - if (working_file) - working_file->diagnostics_ = diagnostics; - }); - // Only emit diagnostics for non-interactive sessions, which makes it easier // to identify indexing problems. For interactive sessions, diagnostics are // handled by code completion.