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): output more information on error #22665

Merged
merged 1 commit into from Mar 2, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Mar 2, 2024

No description provided.

@dsherret dsherret requested a review from nayeemrmn March 2, 2024 01:06
@@ -327,7 +327,7 @@ impl LanguageServer {
if let Some(lockfile) = cli_options.maybe_lockfile() {
let lockfile = lockfile.lock();
if let Err(err) = lockfile.write() {
lsp_warn!("Error writing lockfile: {}", err);
lsp_warn!("Error writing lockfile: {:#}", err);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't find what :# does, is it supposed to be :??

Copy link
Member Author

Choose a reason for hiding this comment

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

It outputs the error with context, which is way better than the standard {}. It's buried in the anyhow docs here: https://docs.rs/anyhow/1.0.80/anyhow/struct.Error.html#display-representations

@dsherret dsherret merged commit 942b2aa into denoland:main Mar 2, 2024
17 checks passed
@dsherret dsherret deleted the fix_lsp_more_error_info branch March 2, 2024 02:25
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.

None yet

2 participants