Skip to content

Commit

Permalink
Update vscode-languageclient, vscode-languageserverk open, clipboardy (
Browse files Browse the repository at this point in the history
…#148)

Update language server and language client to 7.*

With the update, we get some benefits:
- Fix load symbols (fixes bug #119) 
- Add support for load symbols on public clusters that need MSA account logins (rather than AAD/Entra account login)
- Fix load symbols on remote connections which dont support clipboard writes
- Update default load symbols params to be the public sample cluster

Also:
- Add steps for manual testing the 5 basic scenarios in kusto-language-server/README.md (activate extension, format document, load symbols, autocomplete, hover info)
- Update `open` and `clipboardy` to the newest non-ESM versions (vs code does NOT support ESM-only modules, ref: microsoft/vscode#130367)
  • Loading branch information
rosshamish committed Apr 29, 2024
1 parent 5328e11 commit c792f56
Show file tree
Hide file tree
Showing 10 changed files with 7,930 additions and 7,858 deletions.
1 change: 0 additions & 1 deletion kusto-language-server/JANK_CLEANUP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- File replacement for formatting goes from 0,0 to Number.MAX_VALUE,MAX_VALUE - If a file happened to be bigger it wouldn't format properly. (Would also be oom exception)
- listener.newState == 2
- .csl files with .create-or-alter function must NOT have a blank line between the .create-or-alter statement and the function name, and must NOT have a blank line between the function name and the opening {, so that the whole thing is one block
- .csl files with .create-or-alter function MUST have a blank line after the opening { and the first line of query, otherwise the whole thing is one block
- we should have settings for the formatting options, and instead of assuming the indent size from the first query block, we should
Expand Down
33 changes: 33 additions & 0 deletions kusto-language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,36 @@ Diagnostics are also available, but are not yet fully supported and are disabled
- Run the launch config.
- If you want to debug the server as well use the launch configuration `Attach to Server`
- In the [Extension Development Host] instance of VSCode, open a `.csl` document

## Manual tests

Scenario 1: extension loads without crashing
- Open a .kusto file
- Verify extension loads successfully ("Kuskus loaded!" notification appears)

Scenario 2: extension can format a kusto query
- Open a .kusto file
- Run "Format Document"
- Verify document is formatted
- Verify no errors in language server logs (Output > [Kuskus] Kusto Language Server)

Scenario 3: extension can load symbols from the publically available sample cluster
- Open a .kusto file
- Run "[Kuskus] Load Symbols from Cluster"
- Use parameters:
- Cluster: https://help.kusto.windows.net
- Database: SampleLogs
- Tenant ID: (empty)
- Log in with your personal MSA account
- Verify authentication succeeds ("[Kuskus] Successfully authenticated to https://help.kusto.windows.net//SampleLogs")
- Verify symbols are loaded successfully ("[Kuskus] Successfully loaded symbols from https://help.kusto.windows.net/undefined/SampleLogs")

Scenario 4: autocomplete
- Open a .kusto file
- Trigger autocomplete (keyboard shortcut Ctrl+Space)
- Verify autocomplete list includes kusto builtin functions

Scenario 5: hover info
- Open a .kusto file
- Hover the mouse over a few symbols, e.g. table names, string literals
- Verify at least some hover info shows up
Loading

0 comments on commit c792f56

Please sign in to comment.