Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): regression where certain diagnostics were showing for disabled files #13530

Merged
merged 2 commits into from
Jan 29, 2022

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jan 29, 2022

Closes #13524

.unwrap_or_default();
let diagnostics = generate_ts_diagnostics(
snapshot.clone(),
&config,
Copy link
Member Author

@dsherret dsherret Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had intended to flip diagnostics to not be calculated at all upfront if the config was disabled and then I completely forgot to do the second half of that 🤦‍♂️

.cloned()
.partition::<Vec<_>, _>(|s| config.specifier_enabled(s));
let ts_diagnostics_map: TsDiagnosticsMap = if !enabled_specifiers.is_empty() {
let req = tsc::RequestMethod::GetDiagnostics(enabled_specifiers);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only doing this for enabled specifiers should be a decent performance improvement in workspaces with a lot of disabled files.

@dsherret dsherret marked this pull request as ready for review January 29, 2022 18:02
Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret merged commit a2e4fa4 into denoland:main Jan 29, 2022
@dsherret dsherret deleted the fix_regression_config_specifiers branch January 29, 2022 22:50
ry pushed a commit to ry/deno that referenced this pull request Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deno 1.18.1 LSP shows errors outside of Deno project
2 participants