Closed nanovak closed 3 months ago
Thanks for the report. I put in a speculative fix for this, it's published now as v2.0.3 https://marketplace.visualstudio.com/items?itemName=rosshamish.kuskus-kusto-syntax-highlighting, please update and let me know how it looks for you
Thanks for the quick turn around! I'm still seeing the same behavior though, even after taking the update. Here's what I'm seeing... Note these are "ticks" and not single quotes. Same key as ~
@nanovak Could you share the full text of that file you're working in? Or a redacted, smaller version that reproduces the issue you're seeing? I'd like to check it in as a test case and see what's going on with it
Oh wait, maybe I see what's going on here. The issues you're talking about come from kusto-language-server, not kusto-syntax-highlighting. There's probably a similar gap in the language server as in #167
Could you try updating to 3.2.0 of the language server ?
Name: [Kuskus] Kusto Language Server Id: rosshamish.kuskus-kusto-language-server Description: Language server for the Kusto query language Version: 3.2.0 Publisher: rosshamish VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=rosshamish.kuskus-kusto-language-server
When I looked this evening, VS Code signaled there was an update for both the Language Server and the Syntax Highlighting so I grabbed both. Sorry, I should have shared that earlier. I'm on v3.2.0 of the language server, and v2.0.3 of the syntax highlighting.
Here's what the code looks like (edited a bit to obfuscate what I'm working on). I'm using the multi-line string because I'm embedding html code into the mix and that includes it's own double quotes (") in the href. EvidenceLink is the name of another string element defined earlier in the query and used inside the html block, so you see why the ``` is needed on the line that starts with 1. Review...
| extend RemediationSteps = strcat(
```<b>Remediate these issues within 7 days to prevent another alert.</b><br>
1. Review your <b><a href="```, EvidenceLink, ```" target="_blank">KPI Dashboard</a></b><br>.
2. Fix the issues shown<br>
```)
| extend Keywords = strcat(QueryId,'foo')
I'm suspicious it's some stale process, could you try reloading the extension and restarting vs code if necessary also?
I see this on 3.2.0 with that block and with diagnostics enabled in the extension's settings, in a github codespace
I do see this broken in my environment on at least one older version, not sure when it first broke or was fixed though
I figured out what the additional problem was, after removing and reinstalling these plugins, plus even a PC reboot (hey it's Windows, you never know). I had "Kusto Notebooks" installed too (https://marketplace.visualstudio.com/items?itemName=donjayamanne.kusto), and when I disabled that the errors went away.
Thanks so much for your diligence in not just fixing the plugin at hand, but helping me to debug this!
You're welcome! I suspect they might have the same bug as this project did. That's a neat extension though.
[Edit: after looking, it's actually the exact same, they have a stale version of the Kusto library checked into their source tree https://github.com/notebookPowerTools/vscode-kusto/tree/main/libs/kusto/min . The fix in this repo was mostly in #127 https://github.com/rosshamish/kuskus/pull/127 ]
Closing for now, let me know if you notice other bugs
Some of my Kusto queries leverage multi-line strings (think embedded HTML). Unfortunately, the Kusto plugin sees ``` and throws a validation error.
ASK: Please support ``` as a recognized string start/end indicator (same as ' or ").
Documentation: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string#multi-line-string-literals