Skip to content

Commit

Permalink
nixd: disable concurrent parsing as it may cause outdated / null AST
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Apr 10, 2024
1 parent 1f42304 commit 395a042
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions nixd/lib/Controller/Support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,7 @@ void Controller::actOnDocumentAdd(PathRef File,
ShmName, ".", ".", static_cast<std::int64_t>(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<lspserver::InboundPort> In,
Expand Down

0 comments on commit 395a042

Please sign in to comment.