ct6502 / vscode-idl

VS Code Extension for IDL (Interactive Data Language)
Other
16 stars 6 forks source link

Python extension still tries to activate a conda environment when an IDL terminal is opened #29

Open asher-m opened 2 years ago

asher-m commented 2 years ago

With the VSCode Python extension running in a project that uses both Python and IDL, the Python extension will still try to activate the environment in use (in this case, my base environment).

When I open an IDL terminal from the command pallet (ctrl + shift + p), I get the following:

C:\Users\asher\ion-transport>cd C:\Users\asher\ion-transport && idl
IDL 8.8.1 (Win32 x86_64 m64).
(c) 2021, Harris Geospatial Solutions, Inc.

Licensed for use by: <me>
License: <my license>
License expires 31-Aug-2022.
IDL> C:/Users/asher/Anaconda3/Scripts/activate

C:/Users/asher/Anaconda3/Scripts/activate     
   ^
% Syntax error.
IDL> conda activate base

conda activate base     
       ^
% Syntax error.
IDL> 

Not a functionality-impairing bug, but something to be aware of that could be fixed.

asher-m commented 2 years ago

For what it's worth, obviously I don't need any python environment running the background, so a solution may be to disable the python extension (if possible) for the terminal the "open IDL terminal" command spawns, if possible.

On the other hand, I can imagine the most distant parts of my imagination that somewhere, someone is somehow using something in a python environment in IDL such that it's required to be invoked prior to IDL starting. In this case, maybe it's possible to simply run the cd ${idlpath} && idl after a delay or after the Python extension runs its things.