microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 769 forks source link

IntelliSense not working for documents with custom URI schemes #6612

Open t1m0thyj opened 4 weeks ago

t1m0thyj commented 4 weeks ago

Environment data

Code Snippet

Example of multi-root VS Code workspace containing both a virtual folder and a local folder:

{
    "folders": [
        {
            "name": "MemFS - Sample",
            "uri": "memfs:/"
        },
        {
            "path": "fsprovider-sample"
        }
    ],
    "settings": {}
}

Repro Steps

  1. Install an extension that creates virtual files such as the MemFS sample extension
  2. Create a VS Code workspace like the one above that contains a virtual folder and also at least one local folder
  3. Open a virtual Python file in the workspace (if using the MemFS extension, run the "MemFS: Create Files" command and open file.py)
  4. Hover over a function name like print or base64.decode and notice that no IntelliSense tooltip is shown
  5. Remove local folders from the workspace (comment them out in the workspace file) and reload VS Code
  6. Open the same virtual Python file and hover over a function name again, now tooltips are shown

Expected behavior

Pylance should always provide IntelliSense for documents with custom URI schemes, including when I am in a multi-root workspace. This is an important use case for extensions that depend on custom schemes, like Zowe Explorer which uses a FileSystemProvider to manage Python (and other) files stored remotely on a z/OS mainframe.

Actual behavior

IntelliSense does not work for virtual files inside a workspace that also contains a local folder. It also does not work if a virtual file is opened in a VS Code window without a workspace and with a local folder open, although this cannot be easily tested with the MemFS extension.

Logs

2024-10-29 08:31:09.928 [info] (Client) Pylance async client (2024.10.1) started with python extension (2024.16.1)
2024-10-29 08:31:10.205 [info] [Info  - 8:31:10 AM] (49930) Server root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:31:10.206 [info] [Info  - 8:31:10 AM] (49930) Pylance language server 2024.10.1 (pyright version 1.1.382, commit e46efc6b) starting
2024-10-29 08:31:10.208 [info] [Info  - 8:31:10 AM] (49930) virtual workspace: zowe-uss:/lpar1_zosmf/u/users/zowe
2024-10-29 08:31:10.208 [info] [Info  - 8:31:10 AM] (49930) Starting service instance "Zowe USS - lpar1"
2024-10-29 08:31:10.210 [info] [Info  - 8:31:10 AM] (49930) Starting service instance "zowe-python-test"
2024-10-29 08:31:10.239 [info] [Info  - 8:31:10 AM] (49930) Setting environmentName for service "Zowe USS - lpar1": "3.13.0 (global)"
2024-10-29 08:31:10.240 [info] [Info  - 8:31:10 AM] (49930) Auto-excluding **/node_modules
2024-10-29 08:31:10.240 [info] [Info  - 8:31:10 AM] (49930) Auto-excluding **/__pycache__
2024-10-29 08:31:10.240 [info] [Info  - 8:31:10 AM] (49930) Auto-excluding **/.*
2024-10-29 08:31:10.368 [info] [Error - 8:31:10 AM] (49930) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 08:31:10.368 [info] [Info  - 8:31:10 AM] (49930) No source files found.
2024-10-29 08:31:10.376 [info] [Info  - 8:31:10 AM] (49930) Setting environmentName for service "zowe-python-test": "3.13.0 (global)"
2024-10-29 08:31:10.376 [info] [Info  - 8:31:10 AM] (49930) Setting pythonPath for service "zowe-python-test": "/opt/homebrew/bin/python3"
2024-10-29 08:31:10.376 [info] [Info  - 8:31:10 AM] (49930) Auto-excluding **/node_modules
2024-10-29 08:31:10.376 [info] [Info  - 8:31:10 AM] (49930) Auto-excluding **/__pycache__
2024-10-29 08:31:10.376 [info] [Info  - 8:31:10 AM] (49930) Auto-excluding **/.*
2024-10-29 08:31:10.401 [info] [Info  - 8:31:10 AM] (49930) Assuming Python version 3.13.0.final.0
2024-10-29 08:31:10.452 [info] [Error - 8:31:10 AM] (49930) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 08:31:10.452 [info] [Info  - 8:31:10 AM] (49930) No source files found.
2024-10-29 08:31:10.631 [info] [Info  - 8:31:10 AM] (49930) Background analysis(1) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:31:10.632 [info] [Info  - 8:31:10 AM] (49930) Background analysis(1) started
2024-10-29 08:31:13.825 [info] (Client) Pylance async client (2024.10.1) started with python extension (2024.16.1)
2024-10-29 08:31:14.085 [info] [Info  - 8:31:14 AM] (50570) Server root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:31:14.085 [info] [Info  - 8:31:14 AM] (50570) Pylance language server 2024.10.1 (pyright version 1.1.382, commit e46efc6b) starting
2024-10-29 08:31:14.088 [info] [Info  - 8:31:14 AM] (50570) virtual workspace: zowe-uss:/lpar1_zosmf/u/users/zowe
2024-10-29 08:31:14.088 [info] [Info  - 8:31:14 AM] (50570) Starting service instance "Zowe USS - lpar1"
2024-10-29 08:31:14.090 [info] [Info  - 8:31:14 AM] (50570) Starting service instance "zowe-python-test"
2024-10-29 08:31:14.117 [info] [Info  - 8:31:14 AM] (50570) Setting environmentName for service "Zowe USS - lpar1": "3.13.0 (global)"
2024-10-29 08:31:14.117 [info] [Info  - 8:31:14 AM] (50570) Auto-excluding **/node_modules
2024-10-29 08:31:14.117 [info] [Info  - 8:31:14 AM] (50570) Auto-excluding **/__pycache__
2024-10-29 08:31:14.117 [info] [Info  - 8:31:14 AM] (50570) Auto-excluding **/.*
2024-10-29 08:31:14.170 [info] [Error - 8:31:14 AM] (50570) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 08:31:14.179 [info] [Info  - 8:31:14 AM] (50570) No source files found.
2024-10-29 08:31:14.184 [info] [Info  - 8:31:14 AM] (50570) Setting environmentName for service "zowe-python-test": "3.13.0 (global)"
2024-10-29 08:31:14.184 [info] [Info  - 8:31:14 AM] (50570) Setting pythonPath for service "zowe-python-test": "/opt/homebrew/bin/python3"
2024-10-29 08:31:14.184 [info] [Info  - 8:31:14 AM] (50570) Auto-excluding **/node_modules
2024-10-29 08:31:14.184 [info] [Info  - 8:31:14 AM] (50570) Auto-excluding **/__pycache__
2024-10-29 08:31:14.184 [info] [Info  - 8:31:14 AM] (50570) Auto-excluding **/.*
2024-10-29 08:31:14.211 [info] [Info  - 8:31:14 AM] (50570) Assuming Python version 3.13.0.final.0
2024-10-29 08:31:14.267 [info] [Error - 8:31:14 AM] (50570) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 08:31:14.267 [info] [Info  - 8:31:14 AM] (50570) No source files found.
2024-10-29 08:31:14.440 [info] [Info  - 8:31:14 AM] (50570) Background analysis(1) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:31:14.443 [info] [Info  - 8:31:14 AM] (50570) Background analysis(1) started
2024-10-29 08:34:42.847 [info] [Info  - 8:34:42 AM] (50570) Starting service instance "<default>"
2024-10-29 08:34:42.861 [info] [Info  - 8:34:42 AM] (50570) Setting environmentName for service "<default>": "3.13.0 (global)"
2024-10-29 08:34:42.861 [info] [Info  - 8:34:42 AM] (50570) Setting pythonPath for service "<default>": "/opt/homebrew/bin/python3"
2024-10-29 08:34:42.861 [info] [Info  - 8:34:42 AM] (50570) Auto-excluding **/node_modules
2024-10-29 08:34:42.861 [info] [Info  - 8:34:42 AM] (50570) Auto-excluding **/__pycache__
2024-10-29 08:34:42.861 [info] [Info  - 8:34:42 AM] (50570) Auto-excluding **/.*
2024-10-29 08:34:42.921 [info] [Info  - 8:34:42 AM] (50570) Assuming Python version 3.13.0.final.0
2024-10-29 08:34:42.975 [info] [Error - 8:34:42 AM] (50570) File or directory "/<default workspace root>/zowe-uss:" does not exist.
2024-10-29 08:34:42.976 [info] [Info  - 8:34:42 AM] (50570) No source files found.
2024-10-29 08:34:43.176 [info] [Info  - 8:34:43 AM] (50570) Background analysis(2) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:34:43.177 [info] [Info  - 8:34:43 AM] (50570) Background analysis(2) started
2024-10-29 08:34:56.967 [info] [Info  - 8:34:56 AM] (50570) Setting environmentName for service "Zowe USS - lpar1": "3.13.0 (global)"
2024-10-29 08:34:56.967 [info] [Info  - 8:34:56 AM] (50570) Auto-excluding **/node_modules
2024-10-29 08:34:56.967 [info] [Info  - 8:34:56 AM] (50570) Auto-excluding **/__pycache__
2024-10-29 08:34:56.967 [info] [Info  - 8:34:56 AM] (50570) Auto-excluding **/.*
2024-10-29 08:34:57.040 [info] [Error - 8:34:57 AM] (50570) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 08:34:57.040 [info] [Info  - 8:34:57 AM] (50570) No source files found.
2024-10-29 08:34:57.041 [info] [Info  - 8:34:57 AM] (50570) Setting environmentName for service "zowe-python-test": "3.13.0 (global)"
2024-10-29 08:34:57.041 [info] [Info  - 8:34:57 AM] (50570) Setting pythonPath for service "zowe-python-test": "/opt/homebrew/bin/python3"
2024-10-29 08:34:57.042 [info] [Info  - 8:34:57 AM] (50570) Auto-excluding **/node_modules
2024-10-29 08:34:57.042 [info] [Info  - 8:34:57 AM] (50570) Auto-excluding **/__pycache__
2024-10-29 08:34:57.042 [info] [Info  - 8:34:57 AM] (50570) Auto-excluding **/.*
2024-10-29 08:34:57.066 [info] [Info  - 8:34:57 AM] (50570) Assuming Python version 3.13.0.final.0
2024-10-29 08:34:57.128 [info] [Error - 8:34:57 AM] (50570) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 08:34:57.128 [info] [Info  - 8:34:57 AM] (50570) No source files found.
2024-10-29 08:34:57.130 [info] [Info  - 8:34:57 AM] (50570) Setting environmentName for service "<default>": "3.13.0 (global)"
2024-10-29 08:34:57.130 [info] [Info  - 8:34:57 AM] (50570) Setting pythonPath for service "<default>": "/opt/homebrew/bin/python3"
2024-10-29 08:34:57.130 [info] [Info  - 8:34:57 AM] (50570) Auto-excluding **/node_modules
2024-10-29 08:34:57.130 [info] [Info  - 8:34:57 AM] (50570) Auto-excluding **/__pycache__
2024-10-29 08:34:57.130 [info] [Info  - 8:34:57 AM] (50570) Auto-excluding **/.*
2024-10-29 08:34:57.159 [info] [Info  - 8:34:57 AM] (50570) Assuming Python version 3.13.0.final.0
2024-10-29 08:34:57.211 [info] [Error - 8:34:57 AM] (50570) File or directory "/<default workspace root>/zowe-uss:" does not exist.
2024-10-29 08:34:57.212 [info] [Info  - 8:34:57 AM] (50570) No source files found.
2024-10-29 08:35:04.532 [info] (Client) Pylance async client (2024.10.1) started with python extension (2024.16.1)
2024-10-29 08:35:04.822 [info] [Info  - 8:35:04 AM] (52713) Server root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:35:04.823 [info] [Info  - 8:35:04 AM] (52713) Pylance language server 2024.10.1 (pyright version 1.1.382, commit e46efc6b) starting
2024-10-29 08:35:04.827 [info] [Info  - 8:35:04 AM] (52713) virtual workspace: zowe-uss:/lpar1_zosmf/u/users/zowe
2024-10-29 08:35:04.828 [info] [Info  - 8:35:04 AM] (52713) Starting service instance "Zowe USS - lpar1"
2024-10-29 08:35:04.831 [info] [Info  - 8:35:04 AM] (52713) Starting service instance "zowe-python-test"
2024-10-29 08:35:04.853 [info] [Info  - 8:35:04 AM] (52713) Setting environmentName for service "Zowe USS - lpar1": "3.13.0 (global)"
2024-10-29 08:35:04.854 [info] [Info  - 8:35:04 AM] (52713) Auto-excluding **/node_modules
2024-10-29 08:35:04.854 [info] [Info  - 8:35:04 AM] (52713) Auto-excluding **/__pycache__
2024-10-29 08:35:04.855 [info] [Info  - 8:35:04 AM] (52713) Auto-excluding **/.*
2024-10-29 08:35:04.958 [info] [Error - 8:35:04 AM] (52713) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 08:35:04.958 [info] [Info  - 8:35:04 AM] (52713) No source files found.
2024-10-29 08:35:04.965 [info] [Info  - 8:35:04 AM] (52713) Setting environmentName for service "zowe-python-test": "3.13.0 (global)"
2024-10-29 08:35:04.966 [info] [Info  - 8:35:04 AM] (52713) Setting pythonPath for service "zowe-python-test": "/opt/homebrew/bin/python3"
2024-10-29 08:35:04.966 [info] [Info  - 8:35:04 AM] (52713) Auto-excluding **/node_modules
2024-10-29 08:35:04.966 [info] [Info  - 8:35:04 AM] (52713) Auto-excluding **/__pycache__
2024-10-29 08:35:04.966 [info] [Info  - 8:35:04 AM] (52713) Auto-excluding **/.*
2024-10-29 08:35:05.004 [info] [Info  - 8:35:05 AM] (52713) Assuming Python version 3.13.0.final.0
2024-10-29 08:35:05.068 [info] [Error - 8:35:05 AM] (52713) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 08:35:05.071 [info] [Info  - 8:35:05 AM] (52713) No source files found.
2024-10-29 08:35:05.257 [info] [Info  - 8:35:05 AM] (52713) Background analysis(1) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 08:35:05.259 [info] [Info  - 8:35:05 AM] (52713) Background analysis(1) started
2024-10-29 09:02:22.419 [info] [Info  - 9:02:22 AM] (52713) Starting service instance "<default>"
2024-10-29 09:02:22.435 [info] [Info  - 9:02:22 AM] (52713) Setting environmentName for service "<default>": "3.13.0 (global)"
2024-10-29 09:02:22.435 [info] [Info  - 9:02:22 AM] (52713) Setting pythonPath for service "<default>": "/opt/homebrew/bin/python3"
2024-10-29 09:02:22.435 [info] [Info  - 9:02:22 AM] (52713) Auto-excluding **/node_modules
2024-10-29 09:02:22.435 [info] [Info  - 9:02:22 AM] (52713) Auto-excluding **/__pycache__
2024-10-29 09:02:22.435 [info] [Info  - 9:02:22 AM] (52713) Auto-excluding **/.*
2024-10-29 09:02:22.475 [info] [Info  - 9:02:22 AM] (52713) Assuming Python version 3.13.0.final.0
2024-10-29 09:02:22.551 [info] [Error - 9:02:22 AM] (52713) File or directory "/<default workspace root>/zowe-uss:" does not exist.
2024-10-29 09:02:22.551 [info] [Info  - 9:02:22 AM] (52713) No source files found.
2024-10-29 09:02:22.553 [info] [Info  - 9:02:22 AM] (52713) [id_0] Logging started
2024-10-29 09:02:22.602 [info] [Error - 9:02:22 AM] (52713) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 09:02:22.602 [info] [Info  - 9:02:22 AM] (52713) No source files found.
2024-10-29 09:02:22.654 [info] [Error - 9:02:22 AM] (52713) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 09:02:22.654 [info] [Info  - 9:02:22 AM] (52713) No source files found.
2024-10-29 09:02:22.702 [info] [Error - 9:02:22 AM] (52713) File or directory "/<default workspace root>/zowe-uss:" does not exist.
2024-10-29 09:02:22.702 [info] [Info  - 9:02:22 AM] (52713) No source files found.
2024-10-29 09:02:22.712 [info] [Info  - 9:02:22 AM] (52713) Background analysis(2) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 09:02:22.714 [info] [Info  - 9:02:22 AM] (52713) Background analysis(2) started
2024-10-29 09:02:31.307 [info] [Info  - 9:02:31 AM] Server process exited successfully
2024-10-29 09:02:34.185 [info] (Client) Pylance async client (2024.10.1) started with python extension (2024.16.1)
2024-10-29 09:02:34.456 [info] [Info  - 9:02:34 AM] (66597) Server root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 09:02:34.456 [info] [Info  - 9:02:34 AM] (66597) Pylance language server 2024.10.1 (pyright version 1.1.382, commit e46efc6b) starting
2024-10-29 09:02:34.459 [info] [Info  - 9:02:34 AM] (66597) virtual workspace: zowe-uss:/lpar1_zosmf/u/users/zowe
2024-10-29 09:02:34.459 [info] [Info  - 9:02:34 AM] (66597) Starting service instance "Zowe USS - lpar1"
2024-10-29 09:02:34.461 [info] [Info  - 9:02:34 AM] (66597) Starting service instance "zowe-python-test"
2024-10-29 09:02:34.485 [info] [Info  - 9:02:34 AM] (66597) Setting environmentName for service "Zowe USS - lpar1": "3.13.0 (global)"
2024-10-29 09:02:34.486 [info] [Info  - 9:02:34 AM] (66597) Auto-excluding **/node_modules
2024-10-29 09:02:34.486 [info] [Info  - 9:02:34 AM] (66597) Auto-excluding **/__pycache__
2024-10-29 09:02:34.486 [info] [Info  - 9:02:34 AM] (66597) Auto-excluding **/.*
2024-10-29 09:02:34.541 [info] [Error - 9:02:34 AM] (66597) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 09:02:34.541 [info] [Info  - 9:02:34 AM] (66597) No source files found.
2024-10-29 09:02:34.548 [info] [Info  - 9:02:34 AM] (66597) Setting environmentName for service "zowe-python-test": "3.13.0 (global)"
2024-10-29 09:02:34.548 [info] [Info  - 9:02:34 AM] (66597) Setting pythonPath for service "zowe-python-test": "/opt/homebrew/bin/python3"
2024-10-29 09:02:34.549 [info] [Info  - 9:02:34 AM] (66597) Auto-excluding **/node_modules
2024-10-29 09:02:34.549 [info] [Info  - 9:02:34 AM] (66597) Auto-excluding **/__pycache__
2024-10-29 09:02:34.549 [info] [Info  - 9:02:34 AM] (66597) Auto-excluding **/.*
2024-10-29 09:02:34.576 [info] [Info  - 9:02:34 AM] (66597) Assuming Python version 3.13.0.final.0
2024-10-29 09:02:34.630 [info] [Error - 9:02:34 AM] (66597) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 09:02:34.630 [info] [Info  - 9:02:34 AM] (66597) No source files found.
2024-10-29 09:02:34.820 [info] [Info  - 9:02:34 AM] (66597) Background analysis(1) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 09:02:34.822 [info] [Info  - 9:02:34 AM] (66597) Background analysis(1) started
2024-10-29 09:33:50.975 [info] [Info  - 9:33:50 AM] Server process exited successfully
2024-10-29 09:33:53.917 [info] (Client) Pylance async client (2024.10.1) started with python extension (2024.16.1)
2024-10-29 09:33:54.239 [info] [Info  - 9:33:54 AM] (79538) Server root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 09:33:54.240 [info] [Info  - 9:33:54 AM] (79538) Pylance language server 2024.10.1 (pyright version 1.1.382, commit e46efc6b) starting
2024-10-29 09:33:54.243 [info] [Info  - 9:33:54 AM] (79538) virtual workspace: zowe-uss:/lpar1_zosmf/u/users/zowe
2024-10-29 09:33:54.244 [info] [Info  - 9:33:54 AM] (79538) Starting service instance "Zowe USS - lpar1"
2024-10-29 09:33:54.246 [info] [Info  - 9:33:54 AM] (79538) Starting service instance "zowe-python-test"
2024-10-29 09:33:54.276 [info] [Info  - 9:33:54 AM] (79538) Setting environmentName for service "Zowe USS - lpar1": "3.13.0 (global)"
2024-10-29 09:33:54.276 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/node_modules
2024-10-29 09:33:54.277 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/__pycache__
2024-10-29 09:33:54.277 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/.*
2024-10-29 09:33:54.428 [info] [Error - 9:33:54 AM] (79538) File or directory "zowe-uss:/lpar1_zosmf/u/users/zowe/zowe-uss%3A" does not exist.
2024-10-29 09:33:54.430 [info] [Info  - 9:33:54 AM] (79538) No source files found.
2024-10-29 09:33:54.441 [info] [Info  - 9:33:54 AM] (79538) Setting environmentName for service "zowe-python-test": "3.13.0 (global)"
2024-10-29 09:33:54.441 [info] [Info  - 9:33:54 AM] (79538) Setting pythonPath for service "zowe-python-test": "/opt/homebrew/bin/python3"
2024-10-29 09:33:54.441 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/node_modules
2024-10-29 09:33:54.442 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/__pycache__
2024-10-29 09:33:54.442 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/.*
2024-10-29 09:33:54.480 [info] [Info  - 9:33:54 AM] (79538) Assuming Python version 3.13.0.final.0
2024-10-29 09:33:54.559 [info] [Error - 9:33:54 AM] (79538) File or directory "/Users/timothy/Projects/test/zowe-python-test/zowe-uss:" does not exist.
2024-10-29 09:33:54.560 [info] [Info  - 9:33:54 AM] (79538) No source files found.
2024-10-29 09:33:54.566 [info] [Info  - 9:33:54 AM] (79538) Starting service instance "<default>"
2024-10-29 09:33:54.578 [info] [Info  - 9:33:54 AM] (79538) Setting environmentName for service "<default>": "3.13.0 (global)"
2024-10-29 09:33:54.578 [info] [Info  - 9:33:54 AM] (79538) Setting pythonPath for service "<default>": "/opt/homebrew/bin/python3"
2024-10-29 09:33:54.579 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/node_modules
2024-10-29 09:33:54.579 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/__pycache__
2024-10-29 09:33:54.579 [info] [Info  - 9:33:54 AM] (79538) Auto-excluding **/.*
2024-10-29 09:33:54.612 [info] [Info  - 9:33:54 AM] (79538) Assuming Python version 3.13.0.final.0
2024-10-29 09:33:54.666 [info] [Error - 9:33:54 AM] (79538) File or directory "/<default workspace root>/zowe-uss:" does not exist.
2024-10-29 09:33:54.668 [info] [Info  - 9:33:54 AM] (79538) No source files found.
2024-10-29 09:33:54.788 [info] [Info  - 9:33:54 AM] (79538) Background analysis(1) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 09:33:54.789 [info] [Info  - 9:33:54 AM] (79538) Background analysis(1) started
2024-10-29 09:33:54.895 [info] [Info  - 9:33:54 AM] (79538) Background analysis(2) root directory: file:///Users/timothy/.vscode/extensions/ms-python.vscode-pylance-2024.10.1/dist
2024-10-29 09:33:54.897 [info] [Info  - 9:33:54 AM] (79538) Background analysis(2) started
t1m0thyj commented 3 weeks ago

Any update on this issue? Please let me know if there are any additional details I can provide to help with reproducing it.

rchiodo commented 3 weeks ago

Thanks for the issue. By default, Pylance doesn't support virtual workspaces. It's because of how the underlying Pyright server needs to be able to read all of the imports from a relative location and in a synchronous manner (making it difficult to use the VS code file system apis to read the files).

There is however an experimental version of Pylance that synchronizes the VS code file system API in order to make this possible. It's not 100% working at the moment but you can try it out with this setting here:

Image

Theoretically that will allow Pylance to read files from your virtual file system as if they were just on the actual disk.