Skip to content

Launching server using command ra_lsp_server failed. #1533

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

Closed
RazrFalcon opened this issue Jul 15, 2019 · 4 comments
Closed

Launching server using command ra_lsp_server failed. #1533

RazrFalcon opened this issue Jul 15, 2019 · 4 comments

Comments

@RazrFalcon
Copy link

The current git version does not start:

[Error - 7:11:06 PM] Starting client failed
Launching server using command ra_lsp_server failed.

Plugin was installed without errors:

> cargo install-code
    Finished dev [unoptimized + debuginfo] target(s) in 0.37s
     Running `target/debug/ra_tools install-code`

will run: cargo install --path crates/ra_lsp_server --force
  Installing ra_lsp_server v0.1.0 (/home/razr/rust-analyzer/crates/ra_lsp_server)
    Updating crates.io index
    Updating git repository `https://github.com/rust-lang/chalk.git`
    Finished release [optimized + debuginfo] target(s) in 1.91s
   Replacing /home/razr/.cargo/bin/ra_lsp_server
    Replaced package `ra_lsp_server v0.1.0 (/home/razr/rust-analyzer/crates/ra_lsp_server)` with `ra_lsp_server v0.1.0 (/home/razr/rust-analyzer/crates/ra_lsp_server)` (executable `ra_lsp_server`)

will run: npm ci
npm WARN prepare removing existing node_modules/ before installation

> [email protected] postinstall /home/razr/rust-analyzer/editors/code
> node ./node_modules/vscode/bin/install

Detected VS Code engine version: ^1.33.0
Found minimal version that qualifies engine range: 1.33.0
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/0dd516dd412d42323fc3464531b1c715d51c4c1a/src/vs/vscode.d.ts
vscode.d.ts successfully installed!

added 168 packages in 5.632s

will run: npm run package

> [email protected] package /home/razr/rust-analyzer/editors/code
> vsce package

Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish /home/razr/rust-analyzer/editors/code
> npm run compile


> [email protected] compile /home/razr/rust-analyzer/editors/code
> tsc -p ./ && shx cp src/utils/terminateProcess.sh out/utils/terminateProcess.sh

This extension consists of 193 separate files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension. You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore
 DONE  Packaged: /home/razr/rust-analyzer/editors/code/ra-lsp-0.0.1.vsix (193 files, 342.29KB)
 WARNING  
The latest version of vsce is 1.65.0 and you have 1.64.0.
Update it now: npm install -g vsce

will run: code --install-extension ./ra-lsp-0.0.1.vsix --force
Installing extensions...
Extension 'ra-lsp-0.0.1.vsix' was successfully installed.

will run: code --list-extensions

I've also tried to install it manually.

Rust 1.36.0
VSCode 1.36.1 (clean instalation)
nodejs 11.14.0

@lnicola
Copy link
Member

lnicola commented Jul 15, 2019

Does it work with PATH=~/.cargo/bin:$PATH code?

@RazrFalcon
Copy link
Author

Yes, my bad. Looks like VSCode ignores .profile for some reasons.

@lnicola
Copy link
Member

lnicola commented Jul 15, 2019

It's not VSCode, it's your DE, which has no obligation to spawn a shell. You can:

  • add ~/.cargo/bin to PATH in your ~/.pam_environment (PATH DEFAULT=${PATH}:@{HOME}/.cargo/bin) or /etc/environment
  • set the full path in the RA Code extension setting
  • make a symlink under /usr/local/bin

@lnicola
Copy link
Member

lnicola commented Jul 15, 2019

@matklad long-term the extension should probably bundle or download the RA binary like other Code extensions do, but that makes development more awkward. Maybe there should be a notice about this somewhere, as it seems that a lot of people get bitten by it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants