microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.31k stars 1.18k forks source link

workspaceFolder on multiroot broken in latest release #22161

Closed ezeholz closed 12 months ago

ezeholz commented 1 year ago

Type: Bug

Having the following workspace:

{
    "folders": [
        {
            "path": "firstService"
        },
        {
            "path": "secondService"
        }
    ],
    "launch": {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "secondService",
                "type": "python",
                "request": "launch",
                "module": "uvicorn",
                "cwd": "${workspaceFolder:secondService}",
                "args": [
                    "app:app",
                    "--reload",
                    "--reload-dir=.",
                    "--env-file=dev.env",
                    "--port=8080"
                ],
                "jinja": true,
                "justMyCode": false,
            }
        ]
    },
    "settings": {
        "python.testing.pytestArgs": [
            "tests"
        ],
        "python.testing.unittestEnabled": false,
        "python.testing.pytestEnabled": true,
        "python.defaultInterpreterPath": "${workspaceFolder}/venv/Scripts/",
        "workspaceKeybindings.debug.enabled": true,
        "editor.defaultFormatter": "ms-python.black-formatter",
    },
}

The action works great in 1.82, but in 1.83 it's silently failing. Seems to be a problem on how the .env variables are load. It loads the .env file on the first folder, overwriting the rest of the .env files on the cwd.

VS Code version: Code 1.83.0 (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:12:16.321Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 x 1697)| |GPU Status|2d_canvas: enabled
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.23GB (1.97GB free)| |Process Argv|--crash-reporter-id 34c04a8f-55ef-4861-a145-ce096f49c5b0| |Screen Reader|no| |VM|0%|
Extensions (12) Extension|Author (truncated)|Version ---|---|--- gitlens|eam|14.3.0 vscode-language-pack-es|MS-|1.83.2023100409 black-formatter|ms-|2023.4.1 python|ms-|2023.16.0 vscode-pylance|ms-|2023.10.10 jupyter|ms-|2023.9.1102792234 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 vscode-thunder-client|ran|2.12.7 sonarlint-vscode|Son|3.21.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263cf:30335440 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263cf:30792227 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 copilotsettingc:30839828 synctok:30821570 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 pythonmhint1:30842940 dsvsc015:30845448 ```
vscodenpa commented 1 year ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.83.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

ezeholz commented 1 year ago

Updated to reflect the version of the issue correctly

karrtikr commented 1 year ago

Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority. Thanks for understanding and the patience!

ezeholz commented 12 months ago

Solved in pre-release. Thanks!