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

RLS builds the 'debug' target instead of 'rls' #311

Closed
patriksvensson opened this issue May 11, 2018 · 12 comments
Closed

RLS builds the 'debug' target instead of 'rls' #311

patriksvensson opened this issue May 11, 2018 · 12 comments

Comments

@patriksvensson
Copy link

patriksvensson commented May 11, 2018

I noticed that the Rust VS Code plugin suddenly was building using the debug target which gave a lot of conflicts when switching between VS Code and the command line and also led to a lot of non-incremental rebuilds for some reason.

By setting the rust.target configuration to rls I got it working again (see picture).

image

Not sure if I messed something up or if this is a regression in the plugin, so feel free to close this issue if you suspect the former.

Rust VS code version: 0.4.2
RLS version: rls-preview 0.126.0-stable (f5a0c91 2018-03-26)

@patriksvensson patriksvensson changed the title RLS builds the debug target instead of rls RLS builds the 'debug' target instead of 'rls' May 11, 2018
@Xanewok
Copy link
Member

Xanewok commented May 11, 2018

Which RLS version are you using?

@patriksvensson
Copy link
Author

@Xanewok

Rust VS code version: 0.4.2
RLS version: rls-preview 0.126.0-stable (f5a0c91 2018-03-26)

Updated the issue body as well with this information.

@Xanewok
Copy link
Member

Xanewok commented May 11, 2018

@patriksvensson that'd be on me - I introduced this bug and fixed it on Mar 29th (rust-lang/rls#793), so this should be fixed in newer versions =)

There is a single RLS version associated with a stable Rust release, so one workaround might be to set default "rust.target" to "rls" for now in the extension. @nrc what do you think?

@Xanewok
Copy link
Member

Xanewok commented May 11, 2018

@patriksvensson wait, setting rust.target fixed that? Shouldn't setting rust.target_dir be correct in this case?

@patriksvensson
Copy link
Author

@Xanewok Correct, setting rust.target fixed that for me.

@Xanewok
Copy link
Member

Xanewok commented May 11, 2018

That's... unexpected! I'll look into that, thanks for reporting it.

@patriksvensson
Copy link
Author

@Xanewok Hold on. I just verified and it creates the rls/debug folder but there's only a cargo.lock in there so it might not have solved it after all. Experienced no more problems after the fix though. Will try target_dir and report back.

@patriksvensson
Copy link
Author

@Xanewok Setting rust.target_dir does nothing. I tried setting it to rls, but it still creates a debug folder. Tried setting the rust.target to rls as well, but that only creates the rls/debug folder with a cargo.lock file.

I deleted the target directory between changes and restarted VS code to make sure that nothing else was interfering with the results.

@zargony
Copy link

zargony commented May 13, 2018

Same problem here (same versions: rls-vscode 0.4.2, Rust 1.26 stable, rls-preview 0.126.0-stable (f5a0c91 2018-03-26)). Setting rust.target_dir doesn't seem to have any effect.

As a workaround, it worked for me to set rust-client.channel to nightly (in my case that's Rust 1.27 nightly 2018-05-07, rls-preview 0.127.0-nightly (d2ade31 2018-05-08))

@AlexEne
Copy link
Member

AlexEne commented May 14, 2018

Just so I understand, the correct behavior is to have my_project/rls/debug and my_project/target/debug ?
Wouldn't target/rls have been a nicer option since that folder is already ignored by the default .gitignore ?

@Xanewok
Copy link
Member

Xanewok commented May 15, 2018

@AlexEne it definitely would have, it was mistake on my part. Merged fix in #316.

I'll close the issue, since this should be definitely resolved now.

⚠️ For anyone still encountering the issue, be sure to specify "rust.target_dir": "target/rls" in the User Settings for the time being, this should be resolved when a new version of the extension is published to the marketplace.

@Xanewok Xanewok closed this as completed May 15, 2018
@scottjmaddox
Copy link

scottjmaddox commented May 16, 2018

Setting target_dir is working as a workaround in one project, but not in another. It is working a project with a cargo workspace, though I'm not sure if that's the root cause of the difference.

Edit: It's not working in a brand new workspace project, though, so that's not the difference... I'll continue to investigate. Any tips on printing the version running inside VSCode, etc? A quick glance has not turned up any documentation.

Edit 2: well, running rls --cli from the command line inside the new test workspace shows the same problem (rls building into target/debug), so maybe it's not rls-vscodes fault after all? Just to be clear, the problem is in both non-workspaces and workspaces.

Edit 3: the issue definitely appears to be with rls itself; I've reopened my issue on the rls repository.

Xanewok pushed a commit to Xanewok/rls-vscode that referenced this issue Mar 27, 2019
…3.8, r=alexheretic

Bump crossbeam-channel from 0.3.6 to 0.3.8

Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.3.6 to 0.3.8.
<details>
<summary>Commits</summary>

- [`3953368`](crossbeam-rs/crossbeam@3953368) Update crossbeam-utils
- [`2ca382b`](crossbeam-rs/crossbeam@2ca382b) Prepare minor release with updated crossbeam-utils
- [`ab6081a`](crossbeam-rs/crossbeam@ab6081a) Update changelog
- [`b5ca594`](crossbeam-rs/crossbeam@b5ca594) Bump minor version
- [`de97b7a`](crossbeam-rs/crossbeam@de97b7a) Rename is_complete to is_completed
- [`9bee238`](crossbeam-rs/crossbeam@9bee238) Update minimal required version for crossbeam-utils
- [`be937e2`](crossbeam-rs/crossbeam@be937e2) channel: remove crossbeam dev-dependency
- [`f826790`](crossbeam-rs/crossbeam@f826790) Bump crossbeam-utils to 0.6.4 rather than 0.7.0
- [`0c9a7b2`](crossbeam-rs/crossbeam@0c9a7b2) Merge [rust-lang#311](https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/311)
- [`bd6603f`](crossbeam-rs/crossbeam@bd6603f) Make mentions of SegQueue in docs consistent
- Additional commits viewable in [compare view](crossbeam-rs/crossbeam@crossbeam-channel-0.3.6...crossbeam-channel-0.3.8)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=crossbeam-channel&package-manager=cargo&previous-version=0.3.6&new-version=0.3.8)](https://dependabot.com/compatibility-score.html?dependency-name=crossbeam-channel&package-manager=cargo&previous-version=0.3.6&new-version=0.3.8)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants