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

daemon stops working after file edit #211

Closed
xhrnca00 opened this issue Nov 4, 2023 · 1 comment
Closed

daemon stops working after file edit #211

xhrnca00 opened this issue Nov 4, 2023 · 1 comment

Comments

@xhrnca00
Copy link

xhrnca00 commented Nov 4, 2023

When running with "mypy-type-checker.preferDaemon": true, the daemon returns the error output only once. All following updates to the file result in no output (even in the logs). This is weird because the normal no-daemon has no such issue. I tried both the bundled and runtime import strategies, Python 3.9 and 3.11.

To reproduce:
0. Create a new profile with just the Mypy Type Checker extension (also installs Python and Pylance).

  1. Set "mypy-type-checker.preferDaemon": true
  2. Create a new file with the following content:
def func(a: float, b: str) -> float:
    return a + b

func(1, "3")
  1. Open the file in VSCode - you should see an Unsupported operand types for + ("float" and "str") error.
  2. Edit the type of b from str to float
  3. Save the file - the error will disappear and no other error should appear
  4. Restart the Mypy server - a new error will appear (there are mismatched types in the function call on line 4)

Expected behavior: the new error should appear immediately after saving without having to reload the extension

Extension log (from doing the steps above):
log.txt

@karthiknadig
Copy link
Member

@xhrnca00 This is a issue with mypy daemon itself. Turn it off for your scenarios.
related python/mypy#15677

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants