Skip to content
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

Consider listening for document close for tasks that have a problem matcher that applies only to closed documents #116760

Closed
bpasero opened this issue Feb 16, 2021 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan tasks Task system issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Feb 16, 2021

image

@bpasero bpasero added important Issue identified as high-priority web Issues related to running VSCode in the web labels Feb 16, 2021
@sandy081 sandy081 removed their assignment Feb 18, 2021
@sandy081
Copy link
Member

Not sure who shall own this, it seems corresponding task is not creating the diagnostics

@alexr00
Copy link
Member

alexr00 commented Feb 18, 2021

I will take a look.

@alexr00
Copy link
Member

alexr00 commented Feb 19, 2021

@bpasero I'm not able to repro this. Tested with both desktop and in web with a Codespace. My steps:

  1. Open microsoft/vscode.
  2. Make an edit in a file that will cause a compile error.
  3. Close the file. This ensures that any errors that follow will come from the build task, not from the typescript extension.
  4. Run the default build task.
  5. See error show in problem view and in the status bar. ✔️

Is it possible that you had the file open, had the error, then closed the file? The tasks system has always had the behavior that for typescript that will cause the error to go away until there's a file change that causes the build task to print the error again. This is because the typescript extension and the problem matcher for our build task use the same error source to prevent duplicate errors.

@bpasero
Copy link
Member Author

bpasero commented Feb 19, 2021

Is it possible that you had the file open, had the error, then closed the file? The tasks system has always had the behavior that for typescript that will cause the error to go away until there's a file change that causes the build task to print the error again. This is because the typescript extension and the problem matcher for our build task use the same error source to prevent duplicate errors.

Yeah possibly. The reason this frustrated me is that I had pushed changes to our master branch that included compile errors. I typically expect an error from the git commit whenever I have compile errors and wasn't sure why I did not get it here this time.

Imho whatever error is indicated in the terminal from a task should be reflected in the global problems entry and protect me from pushing code with compile errors.

@alexr00
Copy link
Member

alexr00 commented Feb 19, 2021

If you have "typescript.validate.enable": true (default), then this is unavoidable, since the problems from the task will conflict with the problems from typescript. You can set that setting to false, then change the build task to show errors for "allDocuments" instead of "closedDocuments". Or, we can decide that we are happy to have errors get duplicated (once from the task, once from typescript). Typescript's errors only come from the open files, which is why we have this issue in the first place.

@alexr00
Copy link
Member

alexr00 commented Feb 19, 2021

I suppose the tasks system could listen for file changes then re-apply all of the last problems.

@alexr00 alexr00 added this to the March 2021 milestone Feb 19, 2021
@alexr00 alexr00 added feature-request Request for new features or functionality tasks Task system issues and removed important Issue identified as high-priority web Issues related to running VSCode in the web labels Feb 19, 2021
@alexr00 alexr00 changed the title Problems in compile terminal no longer show up in marker Consider listening for document close for tasks that have a problem matcher that applies only to closed documents Feb 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan tasks Task system issues
Projects
None yet
Development

No branches or pull requests

4 participants
@bpasero @sandy081 @alexr00 and others