-
Notifications
You must be signed in to change notification settings - Fork 686
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
Extension no longer loads in NixOS (uname in non-standard location) #5575
Comments
Also ran into this. Altough setting up some symlinks results in the same failure:
|
Although I can't see any issue relating to uname on my side, this extension just doesnt work at all for me after v1.25.0, and doesn't appear to load or anything in vscode at all - no line completion/linting , and the c# and omnisharp log just dont exist in the output window. I'm using direnv to create my dotnet dev environment from a flake, if the issue is really stripping the envvars from process, that would mean that direnv is having no effect at all on the extension after this version - so gets confused by nix. |
Hello! I am also encountering this issue, and my solution so far has been to downgrade to
For me, this message appeared in [Help > Toggle Developer Tools]. |
|
Yes |
I have implemented a fix for this in the nixpkgs package for this extension, but it'd be nice if this was fixed to check |
I just came across this issue when developing my F# project remotely on a NixOS machine.
vscode-csharp/src/shared/platform.ts Line 176 in 1755b7b
The Lines 59 to 65 in 1755b7b
Since we don't provide However on NixOS, the The |
I am facing this issue using nixos on WSL. The following configuration file took care most WSL related errors.
However this error is entirely extension related. @jkoritzinsky could you review @KiruyaMomochi''s comments above about why env is defaulted to empty. Right now the only workaround is to modify the extension after installation. Thanks! |
Still seems to be a problem `2024-04-28 21:44:02.365 [error] Activating extension ms-dotnettools.csharp failed due to an error:
|
Environment data
dotnet --info
output:VS Code version: 1.75.0
C# Extension version: 1.25.4 (but happens sinde v1.25.1-beta2 when #4738 got merged)
OmniSharp log
Steps to reproduce
Expected behavior
Extension opens and works.
Actual behavior
Error when invoking
uname -m
as we no longer inherit the process' env vars.Additional context
In NixOS,
uname
is not located in neither/bin
nor/usr/bin
(which is whatchild_process
checks by default ifenv.PATH
is not specified), so the call to invokeuname
should include the process'PATH
to be able to find it.In my system it's located at
/run/current-system/sw/bin/uname
(which is a symlink that resolves to/nix/store/jynqcrh9yxh59w3sckkzmsz9n4r4iv0r-coreutils-full-9.1/bin/uname
but that could change at any moment so the most reliable method to find it to have the process'PATH
).This was introduced in #4738 which sends in an empty object to
child_process
(and that makes in no longer inherit the env vars fromprocess.env
).The text was updated successfully, but these errors were encountered: