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

feat(lsp): Implement textDocument/documentSymbol #9981

Merged
merged 12 commits into from
Apr 20, 2021

Conversation

jeanp413
Copy link
Contributor

@jeanp413 jeanp413 commented Apr 3, 2021

I've implemented the case when the response is a hierarchy of symbols DocumentSymbol[] (same as TypeScriptDocumentSymbolProvider in vscode).
Let me know if I should also implement the case when the response is a flat list of all symbols SymbolInformation[].

Related #8643

cli/lsp/tsc.rs Show resolved Hide resolved
@jeanp413
Copy link
Contributor Author

jeanp413 commented Apr 4, 2021

Not sure what if condition this linting error is referring to, any ideas? ...

Fixed the linting error

@kitsonk kitsonk self-requested a review April 4, 2021 20:26
@bartlomieju bartlomieju added this to the 1.10.0 milestone Apr 16, 2021
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.

Looks good... let's try to remove the allow deprecated though, I think I have a solution.

cli/lsp/capabilities.rs Show resolved Hide resolved
cli/lsp/tsc.rs Show resolved Hide resolved
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

@kitsonk kitsonk merged commit 2079da0 into denoland:main Apr 20, 2021
@kitsonk kitsonk mentioned this pull request Apr 20, 2021
43 tasks
@jeanp413 jeanp413 deleted the lsp-document-symbol branch April 20, 2021 01:30
@kitsonk
Copy link
Contributor

kitsonk commented Apr 20, 2021

I am getting LSP panics (though I can't see what they are) with this commit. I am trying to narrow it down, but if I can't easily find it, we will need to revert this PR.

@kitsonk
Copy link
Contributor

kitsonk commented Apr 20, 2021

Actually I think it is #9664, as I was using a debug build and when I created a test case to reproduce it, I was getting:

process didn't exit successfully: `/Users/kitsonk/github/deno/target/debug/deps/deno-73d82b9ef03210f0 'lsp::language_server::tests::test_document_symbol_with_imports' --exact --nocapture` (signal: 11, SIGSEGV: invalid memory reference)

I did a release build and it went away.

@jeanp413
Copy link
Contributor Author

Actually I think it is #9664,
I did a release build and it went away.

In my case I'm on ubuntu 20.10 and haven't encounter any error so far, either way, let me know if something goes wrong

@kitsonk
Copy link
Contributor

kitsonk commented Apr 20, 2021

In my case I'm on ubuntu 20.10 and haven't encounter any error so far, either way, let me know if something goes wrong

It is something that only affects certain Intel debug builds when you try to access ICU data within JavaScript. tsc has a few code paths that uses the ICU data (the Intl APIs use it) and when you hit one of those it blows up. It has to do with duplicate symbols introduced with WebGPU. It is very obscure. Nothing is wrong with the code.

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

3 participants