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

diagnostics not update after fixed the error #1076

Closed
jadestrong opened this issue Mar 19, 2022 · 8 comments
Closed

diagnostics not update after fixed the error #1076

jadestrong opened this issue Mar 19, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@jadestrong
Copy link

[Trace - 06:57:43 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {
  "changes": [
    {
      "type": 2,
      "uri": "file:///Users/jadestrong/Documents/JadeStrong/test.ts"
    }
  ]
}


[Trace - 06:57:43 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "uri": "file:///Users/jadestrong/Documents/JadeStrong/test.ts",
  "diagnostics": [
    {
      "range": {
        "start": {
          "line": 84,
          "character": 4
        },
        "end": {
          "line": 84,
          "character": 22
        }
      },
      "severity": 4,
      "source": "ts",
      "code": 80007,
      "message": "'await' has no effect on the type of this expression."
    },
    {
      "range": {
        "start": {
          "line": 5,
          "character": 19
        },
        "end": {
          "line": 5,
          "character": 30
        }
      },
      "severity": 1,
      "source": "ts",
      "code": 2305,
      "message": "Module '\"@common/device\"' has no exported member 'isInBrowser'."
    }
  ]
}


[Trace - 06:57:43 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "uri": "file:///Users/jadestrong/Documents/JadeStrong/test.ts",
  "diagnostics": [
    {
      "range": {
        "start": {
          "line": 84,
          "character": 4
        },
        "end": {
          "line": 84,
          "character": 22
        }
      },
      "severity": 4,
      "source": "ts",
      "code": 80007,
      "message": "'await' has no effect on the type of this expression."
    },
    {
      "range": {
        "start": {
          "line": 5,
          "character": 19
        },
        "end": {
          "line": 5,
          "character": 30
        }
      },
      "severity": 1,
      "source": "ts",
      "code": 2305,
      "message": "Module '\"@common/device\"' has no exported member 'isInBrowser'."
    }
  ]
}

I had remove the 'await' keyword, and report a workspace/didChangeWatchedFiles, but publishDiagnostics still report 'await' has no effect on the type of this expression , is there any cache login?

@jadestrong jadestrong changed the title diagnostics not update when fix error diagnostics not update after fixed the error Mar 20, 2022
@johnsoncodehk
Copy link
Member

Can you reproduce this problem in https://github.com/johnsoncodehk/volar-starter? If no please provide a repro case.

@jadestrong
Copy link
Author

https://github.com/jadestrong/volar-starter

Try this. I add a useTest.ts file, and there is an error:
image

And I removed the await keyword, the error message still here:
image

@johnsoncodehk
Copy link
Member

Is this an issue with new version? Which last version do not have this problem?

@jadestrong
Copy link
Author

jadestrong commented Mar 21, 2022

I've just tried the lastet version 0.33.3 , and so is it.
At least the version before rename to volar-language-server is ok.

@jadestrong
Copy link
Author

I tried version 0.33.0 again, and the problem existed.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Mar 21, 2022

What is the code of useTest.ts?

I can't reproduce this problem, could you provide system info by vscode Help: About command?

@jadestrong
Copy link
Author

Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:49.188Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.3.0

Did you enable Take Over Mode ? I can reproduce this problem on my two computer, and VScode and Emacs.

@johnsoncodehk
Copy link
Member

I can confirm this, thanks!

@johnsoncodehk johnsoncodehk added bug Something isn't working and removed need info labels Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants