-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[TypeScript] Request syntax diagnostics when "typescript.tsserver.useSeparateSyntaxServer": "forAllRequests" #127700
Comments
FYI @mjbvz |
Fixed on the VS Code side by 8b3d666 Closing now that upstream fix has been merged too |
To verify:
|
Following those instructions got me this error: |
@amcasey I think something may have changed/regressed on the TypeScript side. I see To test this out:
Here's an example
|
@mjbvz Looking |
I'm seeing
|
@mjbvz It works for me in |
Yes I believe it used to work in the web as well Is that error coming TS server? We did update from webpack 4 -> 5 since I tested this as well so could bundling be causing any issues? |
Yeah, it's from tsserver.web.js. The F12 tools keep freezing when I try to break into it - possibly because there are 3M characters on that line. Edit: it eventually loaded, but I still don't understand what's going wrong. |
I've created microsoft/TypeScript#45242 to fix the exception, but the web server will still drop all events on the floor (not new). Can you please either file a feature request against TS or skip the call to |
Great find @amcasey! I swear I saw this working but I think I was using a custom branch of TypeScript. We need to use |
Most of the credit goes to @andrewbranch. 😄 Yes, you would need to use |
Ah I thought microsoft/TypeScript#44859 also would cover web? Was that only for desktop partial mode? If so, I'll open a new issue for supporting syntax errors on web too |
It does cover web in the sense that the event is generated. Unfortunately, it turns out that web then drops that event on the floor, rather than sending it back to the editor. I agree that the scenario seems important, so please go ahead a file a new issue. e.g. Here's the log entry I see when I run the web editor
|
* Use arrow functions to bind globals correctly in web scenarios microsoft/vscode#127700 (comment) * Add missing spread operators
What was the reasoning behind not supporting events in the first place? Just not needing them? |
@DanielRosenwasser I misread - it does drop the event on the floor, but that's because |
Upstream issue with fix for web microsoft/TypeScript#45313 |
Fixed by pulling in latest TS version For verification, you should just be able to use |
After a week or so of using partial mode full-time, my biggest complaint is that it doesn't flag obvious syntactic errors - particularly unbalanced braces. I can see why we'd want to avoid having partial mode show squiggles when it's enabled temporarily, during project load, but I think it might be nice to enable syntactic diagnostics when
forAllRequests
is set. Having said that, we almost certainly don't want semantic diagnostics, because there will be tons of unresolved symbols andany
s.This will probably require enabling a capability (
semantic
?) that allowsgetErr
requests to be sent and, unless it is gated on a correspondingly updated TS version, a filter to dropsemanticDiag
andsuggestionDiag
events.The text was updated successfully, but these errors were encountered: