-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Environment (.env) file settings are not applied to all folders in VS Code multi-folder workspace #7457
Comments
Hi @schperplata 👋 Thank you for reaching out. .env files specified in .code-workspace should be able to be used workspace-wide, which means that we have a bug here 🐛 I'll add the appropriate triaging labels, thank you for reporting it! |
ping :) Has there been any progress here? It is not a blocker, but still, quite annoying. |
We don't give out ETAs, so no status. Feel free to 👍 your initial issue report to bump up its priority. Thank you for your patience! |
@schperplata Did you use |
@karrtikr Huh, that was a long ago, I don't remember what was the configuration option back then, to be honest. In the meantime, we've been able to solve our issues with converting our folders to proper python packages and use venvs, and these issues were solved. |
Got it, unfortunately I'm unable to reproduce this issue when using the absolute path to
I suspect it was probably a user error, the way to set
Now this will only work the for the first (primary) workspace folder as
Or use the absolute path to the |
Let's say it was so. :) |
Issue Type: Bug
PYTHONPATH variable in .env file is not respected in all folders of a VS Code multi-folder workspace. That cause autocomplete is unable to resolve paths and add recommendations while working on files that are not in a primary workspace folder (where .code-worskpace is located).
Workspace structure (all folders are added to .code-workspace):
I have defined PYTHONPATH to include 'folder2'. I can import and see recomendations of a 'folder 2' files while I edit files in 'folder1', but not while I edit files in 'folder3'.
If I copy .env file and modify 'folder3' settings to use this file, it works.
So, question is: is this correct and expected behaviour? Are .env files, that are specified in .code-workspace meant to be used workspace-wide (eg. in all folders), or are .env files limited to a folder where .code-workspace is placed? Isn't the whole point of multi-root workspaces to be able to use unified settings, eg. in one place (root .code-workspace)?
I can execute (or use it in launch configuration) any module from another folders (folder2/3), but autocomplete does not work, which is bad. Also, have multiplied .env and other files is a bad idea - they need to be maintaned on multiple locations.
Similar problem is described here.
Extension version: 2019.9.34911
VS Code version: Code 1.38.1 (b37e54c98e1a74ba89e03073e5a3761284e3ffb0, 2019-09-11T13:35:15.005Z)
OS version: Windows_NT x64 10.0.17763
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: