Skip to content

Persistent syntax errors in non PS files #2572

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

Closed
jhoneill opened this issue Mar 20, 2020 · 7 comments · Fixed by PowerShell/PowerShellEditorServices#1241
Closed

Persistent syntax errors in non PS files #2572

jhoneill opened this issue Mar 20, 2020 · 7 comments · Fixed by PowerShell/PowerShellEditorServices#1241
Labels
Bug: VS Code Bugs in VS Code itself. Resolution-External Will close automatically.

Comments

@jhoneill
Copy link

System Details

### VSCode version: 1.43.1 fe22a9645b44368865c0ba92e2fb881ff1afce94 x64

### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version: 2.1.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

When the default file type is PowerShell, and something else (e.g. JSON) is pasted into a new Window many syntax errors are detected and shown in the problem window
image

However if the document type changed to JSON or Plain Text the errors are not removed

image

Even if the file is closed the errors remain

image

Expected Behaviour

PowerShell syntax errors should only appear while the file is present and believed to be a PowerShell file.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Mar 20, 2020
@TylerLeonhardt
Copy link
Member

If you made a single file edit, do the Problems go away? Like, add a single space in the file.

@TylerLeonhardt TylerLeonhardt added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Mar 20, 2020
@jhoneill
Copy link
Author

no, sadly

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Mar 20, 2020
@TylerLeonhardt
Copy link
Member

If you add another syntax error (like a random extra } or something) do you get additional Problems showing up?

@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Mar 20, 2020
@jhoneill
Copy link
Author

No, once the type is changed to plain text, the errors are frozen. No new ones get added , but the old ones remain.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Mar 20, 2020
@TylerLeonhardt
Copy link
Member

It seems like other extensions have this issue as well... I just reproed with the C# extension:

Plain text file, C# warning:
image

@jhoneill since I'm also seeing this with C# it's going to be an issue on VS Code itself:
https://github.com/Microsoft/vscode

Can you open an issue there?

@jhoneill
Copy link
Author

microsoft/vscode#93271 basic said it's the responsibility of the extensions...

@TylerLeonhardt
Copy link
Member

PR out for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: VS Code Bugs in VS Code itself. Resolution-External Will close automatically.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants