Registry Mirror
Skip to content

Persistent syntax errors in non PS files #2572

Closed
PowerShell/PowerShellEditorServices
#1241

Description

System Details

### VSCode version: 1.43.1 fe22a9645b44368865c0ba92e2fb881ff1afce94 x64

### VSCode extensions:
andyyaldoo.vscode-json@1.5.0
ms-azure-devops.azure-pipelines@1.165.1
ms-azuretools.vscode-azurefunctions@0.21.0
ms-dotnettools.csharp@1.21.15
ms-mssql.mssql@1.9.0
ms-vscode-remote.remote-containers@0.106.0
ms-vscode-remote.remote-ssh@0.50.0
ms-vscode-remote.remote-ssh-edit@0.50.0
ms-vscode-remote.remote-wsl@0.42.4
ms-vscode-remote.vscode-remote-extensionpack@0.20.0
ms-vscode.azure-account@0.8.8
ms-vscode.powershell@2020.3.0
ms-vscode.powershell-preview@2020.3.0


### 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.

Activity

  1. ghost added
    Needs: Triage
    on Mar 20, 2020
  2. TylerLeonhardt commented on Mar 20, 2020

    @TylerLeonhardt
    Member

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

  3. added and removed
    Needs: Triage
    on Mar 20, 2020
  4. jhoneill commented on Mar 20, 2020

    @jhoneill
    Author

    no, sadly

  5. ghost added
    Needs: Maintainer Attention
    on Mar 20, 2020
  6. TylerLeonhardt commented on Mar 20, 2020

    @TylerLeonhardt
    Member

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

  7. jhoneill commented on Mar 20, 2020

    @jhoneill
    Author

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

  8. ghost added
    Needs: Maintainer Attention
    on Mar 20, 2020
  9. TylerLeonhardt commented on Mar 23, 2020

    @TylerLeonhardt
    Member

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

    Plain text file, C# warning:
    image

    James O'Neill (@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?

  10. added
    Resolution-External
    Bug: VS Code
    and removed
    Needs: Maintainer Attention
    on Mar 23, 2020
  11. jhoneill commented on Mar 24, 2020

    @jhoneill
    Author

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

  12. ghost added
    Needs: Maintainer Attention
    on Mar 24, 2020
  13. TylerLeonhardt commented on Mar 24, 2020

    @TylerLeonhardt
    Member

    PR out for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: VS CodeResolution-External

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions