Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

[CFG] rust.target_dir is broken #322

Closed
boozook opened this issue May 19, 2018 · 4 comments
Closed

[CFG] rust.target_dir is broken #322

boozook opened this issue May 19, 2018 · 4 comments
Labels

Comments

@boozook
Copy link

boozook commented May 19, 2018

The last release (0.4.2).

Default value for rust.target_dir is "rls", so the result dir-tree looks like this:

project_root/
    rls/
    src/
    target/

If I set "rust.target_dir": null or "rust.target_dir": "target/rls" - all is ok, old behaviour is restored.
I think we should fix it and mb. change default value.

@boozook
Copy link
Author

boozook commented May 19, 2018

Oh, I think it was fixed in 0.4.4.

@scottwillmoore
Copy link

I believe I am also experiencing the same issue. I also don't believe it has been fixed, as I am using 0.4.4.

From what I can see, it appears that rls-vscode extension is not respecting the user setting: rust.target_dir: "target/rls". When deleting my target directory and then restarting vscode only the target/{debug,doc} directories are created, regardless of the value that rust.target_dir is set to. By default it is set to target/rls and I did originally have a target/rls directory, before I deleted it.

Using process explorer I can see that the rls.exe has a handle to one of the DLLs in the target/debug directory. This rls.exe is a sub-process of code.exe. I can build and run my Rust code perfectly fine without vscode opened.

I am current using a Windows host with the stable channel of Rust installed through rustup. I use the user setting: rust-client.channel: "stable".

I am more than happy to gather more information if that is needed.

@scottwillmoore
Copy link

After some experimenting, I have found that setting rust.target: "rls" (not rust.target_dir!) will make rls use the target/rls directory. I just saw the option in the user settings and thought I would try it and it worked?! I am not sure what the correct option is too use, but at least for now this allows me to edit with rls and compile and run at the same time.

@Xanewok
Copy link
Member

Xanewok commented Apr 7, 2019

Fixed as of 0.6.1.

@Xanewok Xanewok closed this as completed Apr 7, 2019
matklad pushed a commit to matklad/vscode-rust that referenced this issue Jul 13, 2020
322: Fix analyzer extension fail when there are enabled any VIM extension r=matklad a=max-frai

`type` command is allowed only once to be registered and it was built specially for vim mode.
So if user has vim extension enabled, rust-analyzer initialization failes on trying to register own `type` handler.

Unfortunatelly, there are no nice ways to check if command is already registered so the way is to wrap everything with try/catch and notify user about conflict.

Co-authored-by: frai <me@maxfrai.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants