-
Notifications
You must be signed in to change notification settings - Fork 765
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
Multi-root workspace with hidden directories uses wrong python interpreter #6751
Comments
For But, for |
@Cnoor0171 When you run the hidden script does it pick the right environment? |
Yes. If I run the script using |
Thanks, I was able to repro this issue. It seems to be a bug in Pylance where the wrong environment is detected in multi-root workspace scenarios. Update: |
Type: Bug
Behaviour
If you create a multi-root workspace, select different interpreters for each workspace and create python files inside a hidden directory (folder whose name starts with '.'), the wrong interpreter gets used for syntax highlighting and code completion. It seems to just use the first workspace's interpreter.
Steps to reproduce:
./ws1/ws1.py
./ws1/.hidden_folder/ws1_hidden.py
,./ws2/ws2.py
./ws2/.hidden_folder/ws2_hidden.py
, with exact same content:./ws2/.hidden_folder/ws2_hidden.py
. "Go to Definition" also open the library files in ws1 instead of ws2.Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.4.1
VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:06:49.809Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2
python.languageServer
setting: PylanceUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
The text was updated successfully, but these errors were encountered: