From 395a0428ba506e9cb8d4d379de8efe607d1a75a4 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Wed, 10 Apr 2024 13:39:28 +0800 Subject: [PATCH] nixd: disable concurrent parsing as it may cause outdated / null AST --- nixd/lib/Controller/Support.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/nixd/lib/Controller/Support.cpp b/nixd/lib/Controller/Support.cpp index d57247ced..56c4aa15d 100644 --- a/nixd/lib/Controller/Support.cpp +++ b/nixd/lib/Controller/Support.cpp @@ -93,16 +93,7 @@ void Controller::actOnDocumentAdd(PathRef File, ShmName, ".", ".", static_cast(Buf.size())}); } }; - if (LitTest) { - // In lit-testing mode we don't want to having requests processed before - // document updates. (e.g. Hover before parsing) - // So just invoke the action here. - Action(); - } else { - // Otherwise we may want to concurently parse & serialize the file, so - // post it to the thread pool. - boost::asio::post(Pool, std::move(Action)); - } + Action(); } Controller::Controller(std::unique_ptr In,