-
Notifications
You must be signed in to change notification settings - Fork 676
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
[Bug] Parsing failure when tasks.json contains comments #4377
Comments
@lonix1 Sorry we didn't respond to this issue earlier. I believe it is VS Code sending your this error popup. I think you will want to report this issue at https://github.com/microsoft/vscode/issues |
Thanks I've done that. |
Apparently they don't think it's a vscode issue. One more thing, the error popup shows this:
Any thoughts? |
+1 I am still seeing this issue on latest omnisharp. Proof that it is the omnisharp extension: If you restart the omnisharp server, the error message pops up again. |
UPDATEI'm now using the new c# extension (v2+). Unlike in the bug reproduction above, I no longer have a comment in an "args" array, but the problem remains because when I open the workspace I get the same error:
I tracked down the problem: // allowed
{
// allowed
"version": "2.0.0", // allowed
"tasks": [
// allowed
{
"label": "foo", // ERROR! <<<<<<<<<<<<<<<<<<<
"type": "shell",
"command": "true",
// ERROR! <<<<<<<<<<<<<<<<<<<
},
],
}
// allowed Any comment inside a task hash will trigger this problem. (So actually it's worse than before, because this didn't happen before.) So the parser doesn't fully respect Our tasks file (like most of our code) is heavily commented, so this is a real nuisance, and has been for years. @jasonmalinowski I hope it's ok that I hijacked my own issue with the new reproduction details? An info you need from me just let me know. |
@lonix1 Fine in this case, since it does look to be the same issue. |
Environment data
latest of everything
linux
sdk: 5.0.102
vscode: 1.52.1
c# extension: 1.23.8
Problem
When opening a project, I get a popup error:
Sample
This is
.vscode/tasks.json
which is ajsonc
file:The comment inside the
args
array is the problem. When removed, there is no error.The text was updated successfully, but these errors were encountered: