-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
anchors are dropped by language server (in vscode extension) #10687
Comments
Looks like this is due to the upstream implementation of LSP we rely on: https://github.com/ocaml/ocaml-lsp/blob/556da72593c88b027a7124ae86da6cd638c7d679/lsp/src/uri0.ml#L1-L4 Although they may now have the required support: ocaml/ocaml-lsp#1387 (seems to be as-of-yet unreleased) |
Interesting that Their release cadence does not seem very frequent thought 😞 Why is |
Based off of the comment I assume it's because IntelliJ just doesn't display the code description; I believe if we did the same for VSCode it would appear in a different location than it currently does. Given why this is happening it may be a bit longer than I had anticipated originally :/. I would expect the editor to sanitize any HTML it chooses to render, so I don't think XSS is a concern. cc: @ajbt200128 |
ocaml/ocaml-lsp#1108 yea like @kopecs said this is a deficiency in the ocaml-lsp library, and why queries are also being dropped. As for why intellij concatenates it, indeed it is because they don't show the code description (although there are some alternative sdks for LSP support for intellij products that may support this). |
Not familiar at all with OCAML, is it possible to vendor/bundle in a dependency in a clean way? or can that specific bit be moved into semgrep and fixed? (with a proper comment to be removed once dependency was updated) I wouldn’t mind looking into if it’s more work but acceptable PR |
Yes, it is possible, but it is a fair amount of additional work. The main thing would be changing the dependency here on I'll be out next week but I'm generally happy to review contributions, although I would generally prefer avoiding the need to maintain something redundant. |
Maybe it could have been a fun exercise for a PR but it seems easier to wait for this week then hehe |
The new release was made last friday and I thought I'd try bumping it myself yet versioning does not seem very semver-compatible. While it's minor bump (1.15.1 -> 1.20), there are API breaking changes. Actually, introduced already by bumping to 1.16.1 Looking at ocaml/ocaml-lsp@1.15.1-5.0...1.16.1 quite a few changes to review 😓
As I have no clue about ocaml, I'll need to find more time to look into this but sharing already in case there's a very simple fix (and I'll close my PR) |
I'm opening this issue following up on this slack thread
When using the vscode extension, I saw that
shortlink
was used in the problem details to link to rule details.As I tried to use it with a page that list all my custom rules and used
#rule-id
for direct links, it didn't work. Anything after#
(or?
) is dropped.I've tested in intellij out of curiosity and those are kept there which means the issue would be something around these lines:
semgrep/src/osemgrep/language_server/scan_helpers/Diagnostics.ml
Lines 25 to 35 in fd2717c
The text was updated successfully, but these errors were encountered: