Skip to content

Commit

Permalink
Revert "feat(lsp): add internal debugging logging (denoland#10438)"
Browse files Browse the repository at this point in the history
This reverts commit 81f8585.
  • Loading branch information
ry committed May 12, 2021
1 parent a2dff0a commit d06b8c0
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 268 deletions.
92 changes: 0 additions & 92 deletions cli/logger.rs

This file was deleted.

9 changes: 3 additions & 6 deletions cli/lsp/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,17 @@ pub struct WorkspaceSettings {
/// Code lens specific settings for the workspace.
#[serde(default)]
pub code_lens: CodeLensSettings,

/// A flag that indicates if internal debug logging should be made available.
#[serde(default)]
pub internal_debug: bool,

/// Suggestion (auto-completion) settings for the workspace.
pub suggest: CompletionSettings,

/// A flag that indicates if linting is enabled for the workspace.
#[serde(default)]
pub lint: bool,

/// A flag that indicates if Dene should validate code against the unstable
/// APIs for the workspace.
#[serde(default)]
pub suggest: CompletionSettings,

#[serde(default)]
pub unstable: bool,
}
Expand Down
14 changes: 4 additions & 10 deletions cli/lsp/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,13 @@ async fn update_diagnostics(
snapshot: &language_server::StateSnapshot,
ts_server: &tsc::TsServer,
) {
let mark = snapshot.performance.mark("update_diagnostics", None::<()>);
let mark = snapshot.performance.mark("update_diagnostics");
let lint_enabled = snapshot.config.workspace_settings.lint;

let lint = async {
let collection = collection.clone();
if lint_enabled {
let mark = snapshot
.performance
.mark("update_diagnostics_lint", None::<()>);
let mark = snapshot.performance.mark("update_diagnostics_lint");
let diagnostics =
generate_lint_diagnostics(snapshot.clone(), collection.clone()).await;
{
Expand All @@ -127,9 +125,7 @@ async fn update_diagnostics(

let ts = async {
let collection = collection.clone();
let mark = snapshot
.performance
.mark("update_diagnostics_ts", None::<()>);
let mark = snapshot.performance.mark("update_diagnostics_ts");
let diagnostics =
generate_ts_diagnostics(snapshot.clone(), collection.clone(), ts_server)
.await
Expand All @@ -155,9 +151,7 @@ async fn update_diagnostics(

let deps = async {
let collection = collection.clone();
let mark = snapshot
.performance
.mark("update_diagnostics_deps", None::<()>);
let mark = snapshot.performance.mark("update_diagnostics_deps");
let diagnostics =
generate_dependency_diagnostics(snapshot.clone(), collection.clone())
.await
Expand Down
Loading

0 comments on commit d06b8c0

Please sign in to comment.