Failure to load workspace from VS Code in FHS on NixOS
Has something changed in the way the VS Code extension launches the rust-analyzer server, in the last few months?
I'm running VS code on NixOS using an FHS setup so that VS Code and its extensions see what looks like a normal Linux. When I last used it a few months ago, rust-analzer worked perfectly in this setup, but when I went back to it yesterday (with updated VS Code and extensions), rust-analyzer now fails to load the workspace with error
cd "/home/me/myproject" && "/usr/bin/cargo" "--version" failed, exit status: 1
stderr:
error: command failed: 'cargo': No such file or directory (os error 2)
It seems that the language server is being launched in such a way that it is outside the FHS environment, so it can't find cargo where it expects it. Inside the FHS, cargo is indeed at /usr/bin/cargo. Previously, this wasn't an issue, so either it is being launched differently, or its expectations are different.
Any pointes greatly appreciated.
OS: NixOS Linux x64 6.6.50 VS Code: 1.93.0 in FHS environment including rustup rust-analyser extension: 0.3.2137 from marketplace rust-analyzer: 0.3.2137 from extension rust toolchain: 1.77 from rustup
Hi,
In systems like Kubernetes there is a value called ~initialStartupSeconds~ initialDelaySeconds, which performs a wait prior to executing the checks. I'm not sure how this could be implemented in Docker. I'm afraid that we need to start the server in order to execute the initialization commands so that's something we currently cannot change unless you override the entrypoint command.
Thanks, you probably mean initialDelaySeconds, but in our case it doesn't run on k8s, but via compose as part of CI with custom readiness checks via docker exec. Sure, we can sleep, but that might not be reliable, e.g. if the container hangs on initialization for whatever reason.
I don't believe the container should be starting OpenLDAP on the usual interfaces for the initial config, ldapi:// might be enough as all scripts are run locally anyway. Also readiness-wise, OpenLDAP will report via NOTIFY_SOCKET (systemd-style).
Thanks for the input @mistotebe. I will forward it to the engineering team for consideration but as it is not a critical feature we cannot guarantee an ETA. However, if you want to speed up the process, you can submit a PR and the team will take a look.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.