🐛 fix(lsp_server): disable diagnostics publishing by default
This commit is contained in:
parent
ec2c580a8c
commit
d13b24a5da
|
|
@ -94,7 +94,14 @@ namespace lsp::core
|
||||||
|
|
||||||
InitializeManagerHub();
|
InitializeManagerHub();
|
||||||
RegisterProviders();
|
RegisterProviders();
|
||||||
RegisterDiagnosticsPublisher();
|
if (provider::kEnableDiagnosticsPublisher)
|
||||||
|
{
|
||||||
|
RegisterDiagnosticsPublisher();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spdlog::debug("Diagnostics publisher disabled (staged rollout)");
|
||||||
|
}
|
||||||
|
|
||||||
spdlog::debug("LSP server initialized with {} providers.", dispatcher_.GetAllSupportedMethods().size());
|
spdlog::debug("LSP server initialized with {} providers.", dispatcher_.GetAllSupportedMethods().size());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,8 @@ import lsp.provider.trace.set_trace;
|
||||||
|
|
||||||
export namespace lsp::provider
|
export namespace lsp::provider
|
||||||
{
|
{
|
||||||
|
inline constexpr bool kEnableDiagnosticsPublisher = false;
|
||||||
|
|
||||||
using AllProviders = ProviderRegistry<
|
using AllProviders = ProviderRegistry<
|
||||||
completion_item::Resolve,
|
completion_item::Resolve,
|
||||||
Initialize,
|
Initialize,
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ namespace lsp::test::provider
|
||||||
auto expected = FindPosition(content, "function UnitFunc", false);
|
auto expected = FindPosition(content, "function UnitFunc", false);
|
||||||
assertTrue(location.range.start.line == expected.line, "Definition should resolve in document");
|
assertTrue(location.range.start.line == expected.line, "Definition should resolve in document");
|
||||||
|
|
||||||
assertTrue(saw_diagnostics, "Server should publish diagnostics after didOpen");
|
assertTrue(!saw_diagnostics, "Server should not publish diagnostics during staged rollout");
|
||||||
assertTrue(!by_id["5"].error.has_value(), "Shutdown response should not contain error");
|
assertTrue(!by_id["5"].error.has_value(), "Shutdown response should not contain error");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue