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

Support for VS Code tasks background beginsPattern/endsPattern #7073

Open
segevfiner opened this issue Mar 22, 2022 · 0 comments
Open

Support for VS Code tasks background beginsPattern/endsPattern #7073

segevfiner opened this issue Mar 22, 2022 · 0 comments

Comments

@segevfiner
Copy link

What problem does this feature solve?

VS Code supports monitoring background watch tasks by defining a regex pattern to match a message line when compilation starts and another one for when compilation ends. Messages between those two lines will be checked for problems using the problemMatcher patterns. This allows it to pick up problems for the problems view and mark whether the background watch task succeeded or failed, it has a canned problemMatcher configuration for tsc --watch which can be used to see how this should work. (Also VS Code's own committed tasks for watching VS Code own source also have such patterns defined
The problem is that vue-cli doesn't output any message after it goes idle, and after the reported problems, you get the compilation ended message before the ES Lint/Build problem report due to friendly-errors-webpack-plugin, and no specific message when the background TS type checking ends.

A problemMatcher can also be contributed via Vetur and/or Volar which is preconfigured correctly, so the user doesn't have to copy such configuration by himself. (P.S. Such a configuration should also include applyTo: closedDocuments to avoid duplicated problems from the builtin TS & ESLint plugins). It would also require problemMatcher patterns that can match the TS/build errors as printed by the friendly-errors-webpack-plugin as it is different from the pre-existing patterns.

I haven't yet tried configuring this with Vite and seeing how it works with it.

See https://code.visualstudio.com/docs/editor/tasks for reference and you can also check how the builtin $tsc-watch problemMatcher is configured.

What does the proposed API look like?

Adding the appropriate message to detect the end of compilation after all problems have been reported, including type checking, and adding an appropriate problemMatcher for it, manually or contributed by the extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant