-
Notifications
You must be signed in to change notification settings - Fork 146
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
Linting in VS Code not working when using enableProjectDiagnostics #595
Comments
What is the output of View | Output and then Deno Language Server and the top section from Deno: Language Server Status from the command palette. |
|
As well please. |
Hey @kitsonk, sorry totally overread this. Here it is:
Workspace Details
Performance
|
Ok, the only thing I can see here is that it is an insiders build, and that they may have made a change in 1.64 that breaks vscode_deno's ability to suppress the messages from the built in language server. |
let me know if I can test anything or help further. |
Try using a non-insiders version (1.63) on your machine and see if it works? |
Same thing:
Workspace Details
Performance
|
Hi, I've got exactly the same issue. Is this going to be fixed? |
We have not figured out what the root cause is, and can not reproduce the issue without more information. Could you both provide a list of all VS Code extensions you have installed? |
I've moved the issue to vscode_deno, as built-in diagnostics appearing have nothing to do with the Deno CLI itself, but the suppression mechanism built into vscode_deno. To be clear, these are environmental specific situations, where the supression mechanism is failing for a yet unidentified reason. I had thought that maybe the next release of vscode was breaking something in a way, but @phifa indicates that it is broken in their environment irrespective of insiders. So it is really hard to say "I have exactly the same issue, when will be fixed" because there are potentially many contributing reasons and we have been unable to replicate it and the detailed information provided by @phifa is not revealing anything we wouldn't expect to be true and works in other environments. If @phifa you want to dig a bit deeper, it gets a bit complex, with a TypeScript/JavaScript file open for a Deno enabled project, under the command pallet, run TypeScript: Open TS Server Log. Likely vscode will complain that the logging is not turned on. Choose to enable it, and quit and restart vscode (or use Developer: Reload Window). Once you have the log open, upload it somewhere and link to it in the issue. There should be some diagnostic message in there related to what The most logical guess is that there is some other TypeScript plugin that is modifying the built-in typescript in a way that we can't suppress the messages. |
Here is the log @kitsonk |
@phifa ok, that is interesting, basically the plugin that supresses the message from typescript is not being loaded or passed even. For example this is from a working version:
And here is from the log file you provided:
You can see the following is missing:
The extension registers itself with an API the vscode provides to load this plugin, and for some reason that seems to be going "wrong" in your environment. I don't know if there are extension "trust" issues at play, or something else. Are there any outputs in Log (Window) or Log (Extension Host) or Extension indicating any errors. I will investigate if we get any sort of signal in the extension that the plugin can't be loaded, and then surface that in the client, because ultimately the inability to load the plugin is what is causing the built-in diagnostics to not be supressed. |
wait. no, of course the plugin won't be loaded if I run vscode with ALL extensions disabled. I will do some manual testing without extensions. |
@kitsonk so, now here is a new log output. VS Code with all extensions disabled, except deno: https://gist.github.com/phifa/4ca8945535409964640900c680caa248 Looks like this line |
@phifa ok, it appears that for some reason, the configuration is not coming over for the plugin, which is why it isn't suppressing the diagnostics. For example, something like this is missing from the file:
We do that here: vscode_deno/client/src/ts_api.ts Lines 34 to 38 in 5c6aaab
If that code would throw, it is supposed to complain with a popup giving the error message, which appears to not be working, so for some reason, that code is likely running but silently failing. I am at a loss though as to what could cause this to fail. |
too bad, please let me know if I can assist further. I wonder how many people are having the same issue and how we could reproduce the issue. |
@phifa do you happen to have a Here's a reduced test case: deno_with_checkjs.zip |
@jespertheend no, as you see above in the screenshot, no additional files: #595 (comment) |
Do you have project diagnostics enabled? ( |
@jespertheend YES! I think that might be it! @Namekkural maybe givve this a go! |
These are my workspace settings. This fixes it. |
Related: #437 Though I'm still having this issue as a result of an added |
Thank you for looking into it! Adding
in the jsconfig.json instead of the workspace file fixes Interestingly, adding or removing the line |
@Namekkural If you want the errors to disappear you have to make sure that both:
The |
anything we can do to help fixing the issue? i really want to keep my |
Why do you want to turn it on for a Deno project? It is not useful in that context. |
@kitsonk I like getting early warnings and errors as I am typing. The reason why I prefer enabling project diagnostics over not enabling it, is that changing a file might make errors show up in other files. With project diagnostics enabled, the folders containing errors turn red and you immediately know you've done something wrong. |
Enabling project diagnostics for the built in TypeScript server does not enable the same feature for the Deno language server. If there is a desire for the same feature in the Deno language server, that would be a separate request. This issue only covers the situation where someone has it enabled globally for the built in TypeScript language server, but has enabled Deno for a specifoc workspace. Currently the only workaround would be to disable the feature in the workspace, as it breaks the suppression mechanism of the Deno vscode extension. |
i cannot get it to work... It does not seem possible to have a workspace with one folder a deno project and another folder with a typescript project and enable project diagnostics only for the typescript project. i can only enable it globally. |
Linting error not suppressed as of Oct 26, 2022, mentioned in this Astro Deno SSR adapter issue |
Tracked in #437. |
I set up a simple deno project with only this file. But the linting is messed up. It looks like the default TypeScript language server is still parsing this file, even though I have installed the extension.
My workspace settings:
The text was updated successfully, but these errors were encountered: