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

Use daemon of mypy is slower than not used,and may get stucked when user save changes. #330

Open
WendaoLee opened this issue Nov 18, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed

Comments

@WendaoLee
Copy link

Diagnostic Data

Python version: 3.12
Type of virtual environment used: venv, created by Poetry (version 1.8.4)
Operating system: Windows 11
Version of tool extension you are using: 2024.1.13171012

Behaviour

Expected Behavior

When the plugin option mypy-type-checker.preferDaemon is set to true and mypy-type-checker.reportingScope is set to workspace, I expect the plugin to perform type checking at a speed close or as fast to mypy-type-checker.preferDaemon is set to false.

Actual Behavior

Despite having preferDaemon and reportingScope set, the plugin runs much slower compared to running mypy directly from the command line. This significant speed difference is clearly visible in the logs, leading me to believe this might be a bug with the plugin.

Also,when preferDaemon is enable,when user save file to fix one error of it,the daemon process seems stucked.

Reproduction Steps:

  1. Ensure the plugin option mypy-type-checker.preferDaemon is set to true.
  2. Set mypy-type-checker.reportingScope to workspace to enable type checking across the entire workspace.
  3. Open a large Python project and run type checking within VSCode.

I'd like to offer a reproduce repo if need.

  1. See the logs between the different run case under preferDaemon is enable or not.

Logs:

For the readability,I have shortened some of the process logs. The full logs are included in the 'Extra Details' section.

Logs when preferDaemon is enabled.

// THE SERVER START
2024-11-18 21:22:00.294 [info] Server run command: g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\tool\lsp_server.py

// ...
// some logs ignored here.

2024-11-18 21:22:01.286 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --status-file C:\Users\LeeWe\AppData\Local\Temp\.vscode.dmypy_status\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph

2024-11-18 21:22:01.286 [info] [Trace - 9:22:01 PM] Received notification 'window/logMessage'.
2024-11-18 21:22:01.286 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


// Under 30s get result.
2024-11-18 21:22:31.602 [info] [Trace - 9:22:31 PM] Received notification 'window/logMessage'.
2024-11-18 21:22:31.602 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\nDaemon started\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:43:1:46:62: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:49:1:55:16: error: Function is missing a return type annotation  [no-untyped-def]\n"
}



// When I fix the error....
2024-11-18 21:23:03.480 [info] [Trace - 9:23:03 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:03.480 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 30
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 34,
                    "character": 56
                },
                "end": {
                    "line": 34,
                    "character": 56
                }
            },
            "rangeLength": 0,
            "text": "\r\n    "
        }
    ]
}

// ... some logs ignored

// the dmypy restart ...
2024-11-18 21:23:05.568 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy.dmypy --status-file C:\\Users\\LeeWe\\AppData\\Local\\Temp\\.vscode.dmypy_status\\status-1488e688-b7e0-45ed-ba7e-286d2d37da96.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.568 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --status-file C:\Users\LeeWe\AppData\Local\Temp\.vscode.dmypy_status\status-1488e688-b7e0-45ed-ba7e-286d2d37da96.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:23:05.568 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.568 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.568 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:23:05.569 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.569 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy.dmypy --status-file C:\\Users\\LeeWe\\AppData\\Local\\Temp\\.vscode.dmypy_status\\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.569 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --status-file C:\Users\LeeWe\AppData\Local\Temp\.vscode.dmypy_status\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:23:05.569 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.569 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.569 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:23:06.060 [info] [Trace - 9:23:06 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:06.060 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\n"
}


2024-11-18 21:23:06.060 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :

2024-11-18 21:23:06.061 [info] [Trace - 9:23:06 PM] Received notification 'textDocument/publishDiagnostics'.
2024-11-18 21:23:06.061 [info] Params: {
    "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
    "diagnostics": []
}


2024-11-18 21:23:06.064 [info] [Trace - 9:23:06 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:06.064 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\n"
}


2024-11-18 21:23:06.064 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :

2024-11-18 21:23:06.064 [info] [Trace - 9:23:06 PM] Received notification 'textDocument/publishDiagnostics'.
2024-11-18 21:23:06.064 [info] Params: {
    "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
    "diagnostics": []
}

// get stucked and no response....

Logs when preferDaemon is disabled

// server has restarted
2024-11-18 21:39:33.093 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy --version
2024-11-18 21:39:33.093 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:39:33.483 [info] 
mypy 1.11.2 (compiled: no)


2024-11-18 21:39:33.483 [info] Version info for linter running for G:\Github\LambdaAgentGraph:
mypy 1.11.2 (compiled: no)

2024-11-18 21:39:33.483 [info] SUPPORTED mypy>=1.0.0
FOUND mypy==1.11.2

2024-11-18 21:39:33.487 [debug] Server State: Running
2024-11-18 21:39:33.493 [info] [Trace - 9:39:33 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:33.493 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:39:33.493 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:39:33.494 [info] [Trace - 9:39:33 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:33.494 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}

// get result so quick,and never get stucked.
2024-11-18 21:39:33.494 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:39:36.908 [info] [Trace - 9:39:36 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:36.908 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:45:1:48:62: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:51:1:57:16: error: Function is missing a return type annotation  [no-untyped-def]\n"
}

Outcome When Attempting Debugging Steps:

Did running it from the command line work?

  • Yes, running the mypy command directly was faster.
  • The time taken to run mypy path/to/your/project was significantly less than running it within the VSCode plugin.

Extra Details

  • mypy.ini:
[mypy]
python_version = 3.12
cache_dir = .mypy_cache
sqlite_cache = True
files = lambdaAgentGraph/**/*.py

disallow_untyped_defs = True        
disallow_incomplete_defs = True     
check_untyped_defs = True           
disallow_untyped_decorators = True  
no_implicit_optional = True         
warn_return_any = True             
warn_unused_ignores = True         
no_implicit_reexport = True        

strict_optional = True             
warn_redundant_casts = True         
warn_unused_configs = True          
warn_no_return = True               
warn_unreachable = True             

The logs provieded all compared under the same cache.

Full logs of preferDaemon is enabled

2024-11-18 21:21:58.281 [debug] Server State: Stopped
2024-11-18 21:21:58.282 [info] [Trace - 9:21:58 PM] Sending request 'shutdown - (1)'.
2024-11-18 21:22:00.290 [info] [Error - 9:22:00 PM] Stopping server timed out
2024-11-18 21:22:00.290 [error] Server: Stop failed: Error: Stopping the server timed out
2024-11-18 21:22:00.294 [info] Server run command: g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\tool\lsp_server.py
2024-11-18 21:22:00.294 [info] Server: Start requested.
2024-11-18 21:22:00.294 [debug] Server State: Starting
2024-11-18 21:22:01.037 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:22:01.038 [info] Settings used to run Server:
[
    {
        "cwd": "g:\\Github\\LambdaAgentGraph",
        "workspace": "file:///g%3A/Github/LambdaAgentGraph",
        "args": [
            "--config-file=mypy.ini"
        ],
        "severity": {
            "error": "Error",
            "note": "Information"
        },
        "path": [],
        "ignorePatterns": [],
        "interpreter": [
            "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe"
        ],
        "importStrategy": "useBundled",
        "showNotifications": "onError",
        "extraPaths": [],
        "reportingScope": "workspace",
        "preferDaemon": true
    }
]

2024-11-18 21:22:01.038 [info] Global settings:
{
    "cwd": "${workspaceFolder}",
    "workspace": "C:\\Users\\LeeWe\\AppData\\Local\\Programs\\cursor",
    "args": [
        "--config-file=mypy.ini"
    ],
    "severity": {
        "error": "Error",
        "note": "Information"
    },
    "path": [],
    "ignorePatterns": [],
    "interpreter": [],
    "importStrategy": "useBundled",
    "showNotifications": "onError",
    "extraPaths": [],
    "reportingScope": "workspace",
    "preferDaemon": true
}

2024-11-18 21:22:01.039 [info] sys.path used to run Server:
   g:\Github\LambdaAgentGraph
   c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\libs
   c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\tool
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312\python312.zip
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312\DLLs
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312\Lib
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312
   g:\Github\LambdaAgentGraph\.venv
   g:\Github\LambdaAgentGraph\.venv\Lib\site-packages
   G:\Github\LambdaAgentGraph
2024-11-18 21:22:01.040 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --version
2024-11-18 21:22:01.040 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:22:01.276 [info] 
dmypy 1.11.2


2024-11-18 21:22:01.276 [info] Version info for linter running for G:\Github\LambdaAgentGraph:
dmypy 1.11.2

2024-11-18 21:22:01.276 [info] SUPPORTED mypy>=1.0.0
FOUND mypy==1.11.2

2024-11-18 21:22:01.280 [debug] Server State: Running
2024-11-18 21:22:01.286 [info] [Trace - 9:22:01 PM] Received notification 'window/logMessage'.
2024-11-18 21:22:01.286 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy.dmypy --status-file C:\\Users\\LeeWe\\AppData\\Local\\Temp\\.vscode.dmypy_status\\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:22:01.286 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --status-file C:\Users\LeeWe\AppData\Local\Temp\.vscode.dmypy_status\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:22:01.286 [info] [Trace - 9:22:01 PM] Received notification 'window/logMessage'.
2024-11-18 21:22:01.286 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:22:01.286 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:22:31.602 [info] [Trace - 9:22:31 PM] Received notification 'window/logMessage'.
2024-11-18 21:22:31.602 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\nDaemon started\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:43:1:46:62: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:49:1:55:16: error: Function is missing a return type annotation  [no-untyped-def]\n"
}


2024-11-18 21:22:31.602 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :
Daemon started
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:43:1:46:62: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:49:1:55:16: error: Function is missing a return type annotation  [no-untyped-def]

2024-11-18 21:22:31.602 [info] [Trace - 9:22:31 PM] Received notification 'window/logMessage'.
2024-11-18 21:22:31.602 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\nDaemon started\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:43:1:46:62: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:49:1:55:16: error: Function is missing a return type annotation  [no-untyped-def]\n"
}


2024-11-18 21:22:31.602 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :
Daemon started
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:43:1:46:62: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:49:1:55:16: error: Function is missing a return type annotation  [no-untyped-def]

2024-11-18 21:22:31.605 [info] [Trace - 9:22:31 PM] Received notification 'textDocument/publishDiagnostics'.
2024-11-18 21:22:31.606 [info] Params: {
    "uri": "file:///g:/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 33,
                    "character": 0
                },
                "end": {
                    "line": 34,
                    "character": 56
                }
            },
            "message": "Function is missing a return type annotation",
            "severity": 1,
            "code": "no-untyped-def",
            "codeDescription": {
                "href": "https://mypy.readthedocs.io/en/latest/_refs.html#code-no-untyped-def"
            },
            "source": "Mypy"
        },
        {
            "range": {
                "start": {
                    "line": 42,
                    "character": 0
                },
                "end": {
                    "line": 45,
                    "character": 62
                }
            },
            "message": "Function is missing a return type annotation",
            "severity": 1,
            "code": "no-untyped-def",
            "codeDescription": {
                "href": "https://mypy.readthedocs.io/en/latest/_refs.html#code-no-untyped-def"
            },
            "source": "Mypy"
        },
        {
            "range": {
                "start": {
                    "line": 48,
                    "character": 0
                },
                "end": {
                    "line": 54,
                    "character": 16
                }
            },
            "message": "Function is missing a return type annotation",
            "severity": 1,
            "code": "no-untyped-def",
            "codeDescription": {
                "href": "https://mypy.readthedocs.io/en/latest/_refs.html#code-no-untyped-def"
            },
            "source": "Mypy"
        }
    ]
}


2024-11-18 21:23:03.480 [info] [Trace - 9:23:03 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:03.480 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 30
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 34,
                    "character": 56
                },
                "end": {
                    "line": 34,
                    "character": 56
                }
            },
            "rangeLength": 0,
            "text": "\r\n    "
        }
    ]
}


2024-11-18 21:23:03.480 [info] [Trace - 9:23:03 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:03.480 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 30
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 34,
                    "character": 56
                },
                "end": {
                    "line": 34,
                    "character": 56
                }
            },
            "rangeLength": 0,
            "text": "\r\n    "
        }
    ]
}


2024-11-18 21:23:03.815 [info] [Trace - 9:23:03 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:03.815 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 31
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 35,
                    "character": 4
                },
                "end": {
                    "line": 35,
                    "character": 4
                }
            },
            "rangeLength": 0,
            "text": "\r\n    "
        },
        {
            "range": {
                "start": {
                    "line": 35,
                    "character": 0
                },
                "end": {
                    "line": 35,
                    "character": 4
                }
            },
            "rangeLength": 4,
            "text": ""
        }
    ]
}


2024-11-18 21:23:03.815 [info] [Trace - 9:23:03 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:03.815 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 31
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 35,
                    "character": 4
                },
                "end": {
                    "line": 35,
                    "character": 4
                }
            },
            "rangeLength": 0,
            "text": "\r\n    "
        },
        {
            "range": {
                "start": {
                    "line": 35,
                    "character": 0
                },
                "end": {
                    "line": 35,
                    "character": 4
                }
            },
            "rangeLength": 4,
            "text": ""
        }
    ]
}


2024-11-18 21:23:04.243 [info] [Trace - 9:23:04 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:04.243 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 32
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 36,
                    "character": 0
                },
                "end": {
                    "line": 36,
                    "character": 4
                }
            },
            "rangeLength": 4,
            "text": ""
        }
    ]
}


2024-11-18 21:23:04.244 [info] [Trace - 9:23:04 PM] Sending notification 'textDocument/didChange'.
2024-11-18 21:23:04.244 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
        "version": 32
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 36,
                    "character": 0
                },
                "end": {
                    "line": 36,
                    "character": 4
                }
            },
            "rangeLength": 4,
            "text": ""
        }
    ]
}


2024-11-18 21:23:05.563 [info] [Trace - 9:23:05 PM] Sending notification 'textDocument/didSave'.
2024-11-18 21:23:05.563 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py"
    }
}


2024-11-18 21:23:05.563 [info] [Trace - 9:23:05 PM] Sending notification 'textDocument/didSave'.
2024-11-18 21:23:05.563 [info] Params: {
    "textDocument": {
        "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py"
    }
}


2024-11-18 21:23:05.568 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.568 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy.dmypy --status-file C:\\Users\\LeeWe\\AppData\\Local\\Temp\\.vscode.dmypy_status\\status-1488e688-b7e0-45ed-ba7e-286d2d37da96.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.568 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --status-file C:\Users\LeeWe\AppData\Local\Temp\.vscode.dmypy_status\status-1488e688-b7e0-45ed-ba7e-286d2d37da96.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:23:05.568 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.568 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.568 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:23:05.569 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.569 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy.dmypy --status-file C:\\Users\\LeeWe\\AppData\\Local\\Temp\\.vscode.dmypy_status\\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.569 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy.dmypy --status-file C:\Users\LeeWe\AppData\Local\Temp\.vscode.dmypy_status\status-91003f0e-53ef-4737-97c8-e04c183ad276.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:23:05.569 [info] [Trace - 9:23:05 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:05.569 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:23:05.569 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:23:06.060 [info] [Trace - 9:23:06 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:06.060 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\n"
}


2024-11-18 21:23:06.060 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :

2024-11-18 21:23:06.061 [info] [Trace - 9:23:06 PM] Received notification 'textDocument/publishDiagnostics'.
2024-11-18 21:23:06.061 [info] Params: {
    "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
    "diagnostics": []
}


2024-11-18 21:23:06.064 [info] [Trace - 9:23:06 PM] Received notification 'window/logMessage'.
2024-11-18 21:23:06.064 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\n"
}


2024-11-18 21:23:06.064 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :

2024-11-18 21:23:06.064 [info] [Trace - 9:23:06 PM] Received notification 'textDocument/publishDiagnostics'.
2024-11-18 21:23:06.064 [info] Params: {
    "uri": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
    "diagnostics": []
}

Full logs of preferDaemon is disabled

2024-11-18 21:39:32.336 [info] Server: Stop requested
2024-11-18 21:39:32.336 [debug] Server State: Stopped
2024-11-18 21:39:32.336 [info] [Trace - 9:39:32 PM] Sending request 'shutdown - (1)'.
2024-11-18 21:39:32.338 [info] [Trace - 9:39:32 PM] Received response 'shutdown - (1)' in 2ms.
2024-11-18 21:39:32.339 [info] No result returned.


2024-11-18 21:39:32.339 [info] [Trace - 9:39:32 PM] Sending notification 'exit'.
2024-11-18 21:39:32.339 [info] No parameters provided.


2024-11-18 21:39:32.345 [info] Server run command: g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\tool\lsp_server.py
2024-11-18 21:39:32.346 [info] Server: Start requested.
2024-11-18 21:39:32.346 [debug] Server State: Starting
2024-11-18 21:39:33.090 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:39:33.091 [info] Settings used to run Server:
[
    {
        "cwd": "g:\\Github\\LambdaAgentGraph",
        "workspace": "file:///g%3A/Github/LambdaAgentGraph",
        "args": [
            "--config-file=mypy.ini"
        ],
        "severity": {
            "error": "Error",
            "note": "Information"
        },
        "path": [],
        "ignorePatterns": [],
        "interpreter": [
            "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe"
        ],
        "importStrategy": "useBundled",
        "showNotifications": "onError",
        "extraPaths": [],
        "reportingScope": "workspace",
        "preferDaemon": false
    }
]

2024-11-18 21:39:33.091 [info] Global settings:
{
    "cwd": "${workspaceFolder}",
    "workspace": "C:\\Users\\LeeWe\\AppData\\Local\\Programs\\cursor",
    "args": [
        "--config-file=mypy.ini"
    ],
    "severity": {
        "error": "Error",
        "note": "Information"
    },
    "path": [],
    "ignorePatterns": [],
    "interpreter": [],
    "importStrategy": "useBundled",
    "showNotifications": "onError",
    "extraPaths": [],
    "reportingScope": "workspace",
    "preferDaemon": false
}

2024-11-18 21:39:33.091 [info] sys.path used to run Server:
   g:\Github\LambdaAgentGraph
   c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\libs
   c:\Users\LeeWe\.cursor\extensions\ms-python.mypy-type-checker-2024.0.0\bundled\tool
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312\python312.zip
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312\DLLs
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312\Lib
   C:\Users\LeeWe\AppData\Local\Programs\Python\Python312
   g:\Github\LambdaAgentGraph\.venv
   g:\Github\LambdaAgentGraph\.venv\Lib\site-packages
   G:\Github\LambdaAgentGraph
2024-11-18 21:39:33.093 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy --version
2024-11-18 21:39:33.093 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:39:33.483 [info] 
mypy 1.11.2 (compiled: no)


2024-11-18 21:39:33.483 [info] Version info for linter running for G:\Github\LambdaAgentGraph:
mypy 1.11.2 (compiled: no)

2024-11-18 21:39:33.483 [info] SUPPORTED mypy>=1.0.0
FOUND mypy==1.11.2

2024-11-18 21:39:33.487 [debug] Server State: Running
2024-11-18 21:39:33.493 [info] [Trace - 9:39:33 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:33.493 [info] Params: {
    "type": 4,
    "message": "g:\\Github\\LambdaAgentGraph\\.venv\\Scripts\\python.exe -m mypy --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:39:33.493 [info] g:\Github\LambdaAgentGraph\.venv\Scripts\python.exe -m mypy --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --config-file=mypy.ini --show-error-end g:\Github\LambdaAgentGraph
2024-11-18 21:39:33.494 [info] [Trace - 9:39:33 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:33.494 [info] Params: {
    "type": 4,
    "message": "CWD Server: g:\\Github\\LambdaAgentGraph"
}


2024-11-18 21:39:33.494 [info] CWD Server: g:\Github\LambdaAgentGraph
2024-11-18 21:39:36.908 [info] [Trace - 9:39:36 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:36.908 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:45:1:48:62: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:51:1:57:16: error: Function is missing a return type annotation  [no-untyped-def]\n"
}


2024-11-18 21:39:36.908 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:45:1:48:62: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:51:1:57:16: error: Function is missing a return type annotation  [no-untyped-def]

2024-11-18 21:39:36.908 [info] [Trace - 9:39:36 PM] Received notification 'window/logMessage'.
2024-11-18 21:39:36.909 [info] Params: {
    "type": 4,
    "message": "file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :\r\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:45:1:48:62: error: Function is missing a return type annotation  [no-untyped-def]\ng:\\Github\\LambdaAgentGraph\\lambdaAgentGraph\\main.py:51:1:57:16: error: Function is missing a return type annotation  [no-untyped-def]\n"
}


2024-11-18 21:39:36.909 [info] file:///g%3A/Github/LambdaAgentGraph/lambdaAgentGraph/main.py :
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:34:1:35:56: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:45:1:48:62: error: Function is missing a return type annotation  [no-untyped-def]
g:\Github\LambdaAgentGraph\lambdaAgentGraph\main.py:51:1:57:16: error: Function is missing a return type annotation  [no-untyped-def]

2024-11-18 21:39:36.911 [info] [Trace - 9:39:36 PM] Received notification 'textDocument/publishDiagnostics'.
2024-11-18 21:39:36.912 [info] Params: {
    "uri": "file:///g:/Github/LambdaAgentGraph/lambdaAgentGraph/main.py",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 33,
                    "character": 0
                },
                "end": {
                    "line": 34,
                    "character": 56
                }
            },
            "message": "Function is missing a return type annotation",
            "severity": 1,
            "code": "no-untyped-def",
            "codeDescription": {
                "href": "https://mypy.readthedocs.io/en/latest/_refs.html#code-no-untyped-def"
            },
            "source": "Mypy"
        },
        {
            "range": {
                "start": {
                    "line": 44,
                    "character": 0
                },
                "end": {
                    "line": 47,
                    "character": 62
                }
            },
            "message": "Function is missing a return type annotation",
            "severity": 1,
            "code": "no-untyped-def",
            "codeDescription": {
                "href": "https://mypy.readthedocs.io/en/latest/_refs.html#code-no-untyped-def"
            },
            "source": "Mypy"
        },
        {
            "range": {
                "start": {
                    "line": 50,
                    "character": 0
                },
                "end": {
                    "line": 56,
                    "character": 16
                }
            },
            "message": "Function is missing a return type annotation",
            "severity": 1,
            "code": "no-untyped-def",
            "codeDescription": {
                "href": "https://mypy.readthedocs.io/en/latest/_refs.html#code-no-untyped-def"
            },
            "source": "Mypy"
        }
    ]
}

@WendaoLee WendaoLee added the bug Issue identified by VS Code Team member as probable bug label Nov 18, 2024
@WendaoLee WendaoLee changed the title Use daemon of mypy is slower than not used,and may get stucked when user made changes. Use daemon of mypy is slower than not used,and may get stucked when user save changes. Nov 18, 2024
@karthiknadig
Copy link
Member

@WendaoLee Can you provide a repro? also what is the version of mypy that you are running from the terminal? does it match the one shipped with the extension?

@karthiknadig karthiknadig self-assigned this Nov 18, 2024
@WendaoLee
Copy link
Author

@WendaoLee Can you provide a repro? also what is the version of mypy that you are running from the terminal? does it match the one shipped with the extension?

does it match the one shipped with the extension?

Oh,sorry. I haven't noticed that.I have installed mypy of version 1.13.0 in my venv.Is this the reason?

For repro,I have provieded one:https://github.com/WendaoLee/mypy-typechecker-reprorepo.

Thanks for your reply.🥰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed
Projects
None yet
Development

No branches or pull requests

2 participants