I have also searched in ElixirLsâs settings page in VSCode and I was not able to find anything that would allow me to take advantage of the new PR (aka, no section called âdefine env varsâ). I am sure I missed it:
I was able to somehow fix the issue.
Bakeware, the dependency, really likes Powershell. But not any powershell. A powershell with admin rights.
To get rid of the warning one must perform the following steps while VSCode is closed:
Open Windows Powershell in admin mode
set $env:CC="gcc"
set $env:MAKE="make"
set MIX_ENV to something. It doesnt have to be prod, but since powershell does not set this value by default, you have to manually set it yourself. Before running tests, fetching dependencies or anything.
mix deps.get
After this, if you still get the red wall of death, trying deleting your .elixir_ls folder to force to go again.
Then open VSCode with code .
Hope it works for you, it did for me.
Trying this with any other terminal will result in seeing the red wall of death. According to my experiments, powershell is the only that works.
In my experience, you donât need to use PowerShell, nor do you require it to be an administrative shell. You do however need to set those environment variables, which Iâm sure I added to the readme. Setting MAKE with the $env command wonât last, so do it through the Windows UI (press Windows key and type âenvâ and the shortcurt should show up) to keep VSCode happy.
Fun fact, you can also use zig as your c compiler with CC=zig cc.