cmu-sei / Polar

Polar is a secure and scalable knowledge graph framework, designed to address the challenges posed by building big data systems in highly regulated environments, and improve observability for DevSecOps Organizations.
Other
9 stars 1 forks source link

Rust Analyzer Fails to Start #18

Open daveman1010221 opened 1 month ago

daveman1010221 commented 1 month ago

I tried a few different ways of starting the devcontainer, to no great success. Some data points:

The error seems to indicate that a 'nixbld' group is needed to proceed. I'm skeptical. It's possible Rust Analyzer has never worked in my testing, but I think it has in the past. As I'm doing Rust dev, it's an important extension. Container is currently unusable for me.

VS Code details: Version: 1.93.0-insider Commit: 27f650ea2366a6b99b4727b2bec9731904d52ac5 Date: 2024-08-15T05:03:41.839Z Electron: 30.3.1 ElectronBuildId: 9960165 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Linux x64 6.8.0-40-lowlatency snap

Error:

`[error] Bootstrap error Error: warning: the group 'nixbld' specified in 'build-users-group' does not exist error: … while calling the 'import' builtin

     at «stdin»:2:29:

        1|
        2|             {srcStr, pkgs ? import <nixpkgs> {}}:
         |                             ^
        3|                 pkgs.stdenv.mkDerivation {

   … while calling the 'findFile' builtin

     at «stdin»:2:36:

        1|
        2|             {srcStr, pkgs ? import <nixpkgs> {}}:
         |                                    ^
        3|                 pkgs.stdenv.mkDerivation {

   error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at «none»:0: (source not available)

at /root/.vscode-server-insiders/extensions/rust-lang.rust-analyzer-0.3.2070-linux-x64/out/main.js:356:291
at ChildProcess.exithandler (node:child_process:430:5)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:519:28)
at Pipe.<anonymous> (node:net:338:12)`
daveman1010221 commented 1 month ago

Created a branch for this issue:

git fetch origin git checkout 18-rust-analyzer-fails-to-start

vonjackets commented 1 week ago

So this turned out to be a problem with VSCode rather than the devcontainer itself (or just both?). RustAnalyzer does work wheb connected to the devcontainer via web browser with code-server running. It just appears that VSCode doesn't attach fully to the container when running on a remote host.