-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Problem pane errors persist when file is deleted from filesystem #58088
Comments
I should add that if the deleted file is still open in the editor (with the |
@bpasero Need advice on what to do here. TS doesn't get a |
@mjbvz this is a setting the user can change ( How can I help on this issue here? |
@dbaeumer This issue was caused by fixing #47386. I'm still having trouble understanding what I'm supposed to do for coordinating diagnostics between an extension and a task. Here's what I want to happen:
I can't seem to implement that fourth point today with how diagnostics and tasks work. Is there any way to implement it with the current apis? I'm tempted to revert the fix for #47386 because I suspect more people are hitting this problem vs that one /cc @alexr00 |
Having a TSC task to get project wide errors is IMO a workaround for the fact that at least in the past the TypeScript language server couldn't compute them efficiently. Running a full compiler and a language server IMO only adds unnecessary CPU and memory overhead. @mjbvz do you know if the TypeScript language server made any progress in computing project wide errors and being able to emit JS efficiently. If this is the case leveraging this would IMO be the best options (see tsconfig The rule we used for removing diagnostics from the problem panel on document close was as follows so far:
Regarding the forth point: this can only work for watch tasks (I started to implement this a while back but then didn't continue see branch dbaeumer/47386). Restoring errors from a non watch task might be very confusing to the user since it might just have fixed it by changing code in another file. With the new custom task API (coming this month) the Typescript extension would be able to implement everything itself and manage all errors itself even the once generated by a task. So I would propose to do the following steps:
|
Thanks. Yes compile on save would be ideal but it sounds like it will require larger work. I'm syncing with TS again to see if the apis are ready for us to use and to try to develop a definite plan for adopting this. I should know more by Monday Until then, I'm going to revert the fix for #47386 for two reasons: I believe it is less likely to be hit than this error, and all you have to do to get out of the bad state from #47386 is re-trigger the task, while there is no way to clear the ghost problems from this error |
Issue Type: Bug
As suggested by @dbaeumer (#50448 (comment)), I'm opening a new issue regarding this behavior.
I noticed this when switching between branches.
branch-a
has a file,index.tsx
, which contains TS errors. Opening this file in the editor causes the errors to be reported in the Problems pane.branch-b
has no such file.While still on
branch-a
, closeindex.tsx
, notice that errors persist in the Problems pane.Switch to
branch-b
. Notice the file is no longer present in the file browser window, howeverI can also replicate the issue with all extensions disabled.
VS Code version: Code - Insiders 1.27.0-insider (7b9afc4, 2018-09-03T09:07:33.052Z)
OS version: Darwin x64 17.7.0
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (27)
(6 theme extensions excluded)
The text was updated successfully, but these errors were encountered: