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

Add verbose mode debugging porposes #37

Open
Akiyamka opened this issue May 21, 2024 · 4 comments
Open

Add verbose mode debugging porposes #37

Akiyamka opened this issue May 21, 2024 · 4 comments

Comments

@Akiyamka
Copy link

Akiyamka commented May 21, 2024

bazel-lsp in pair with vscode-bazel spams endlessly with an error when hovering over rules imported from other files.

Log from bazel-lsp:

Request textDocument/hover failed.
  Message: Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}
  Code: 0 
[Error - 1:50:32 PM] Request textDocument/definition failed.
  Message: Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}
  Code: 0 
[Error - 1:50:33 PM] Request textDocument/hover failed.
  Message: Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}
  Code: 0 

... and so on.

Unfortunately this information is not enough to understand what file or directory it is trying to find, and where.
Would be cool to add more info to those messages, probably under --verbose flag

bazel-lsp version: 0.6.0

P.S. One another bug - incorrect version reporting

$ ./bazel-lsp-0.6.0-linux-amd64 -V
bazel-lsp 0.0.0
@cameron-martin
Copy link
Owner

I suspect this is an issue in https://github.com/facebook/starlark-rust. Do you mind opening an issue there?

@cameron-martin
Copy link
Owner

cameron-martin commented Jun 29, 2024

I think this is actually the result of directly converting io::Error to anyhow::Error, and io::Error doesn't contain great info on which file you are trying to open. It would be great if we could get the language server to print stack traces, so we know where this is coming from.

Do you have a reproducer for this, so I can have a play around?

@Akiyamka
Copy link
Author

I don't have anything on hand that I can post publicly, but I'll try to create a new project on bazel 6.5 like I have, I think it will work, let me check

@Akiyamka
Copy link
Author

unfortunately I was unable to reproduce it separately

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

No branches or pull requests

2 participants