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

VS tasks not present on install version 0.6.0 #557

Closed
JamieDStewart opened this issue Apr 1, 2019 · 17 comments
Closed

VS tasks not present on install version 0.6.0 #557

JamieDStewart opened this issue Apr 1, 2019 · 17 comments

Comments

@JamieDStewart
Copy link

Downloaded fresh install of VS plugin on new machine. Followed instructions as per readme, no tasks present after install to build, run etc once install complete.
Press ctrl+shift+b no build task option.
Press ctrl+shift+p search for rust tasks, no “rust: cargo ...” tasks appear in task lists.
Reverting VS plugin to previous version and all rust cargo tasks appear as expected, ctrl+shift+b build task present on previous version not in latest.

@Tape
Copy link

Tape commented Apr 2, 2019

I'm seeing the same, it's also giving me errors indicating rustup is not installed. Reverting to the previous version fixed the issue (Running on Linux).

@mattrudder
Copy link

mattrudder commented Apr 2, 2019

Same here. Upgraded my install from 0.5.4 and was unable to use previously defined build tasks.
Reverting to 0.5.4 fixed the issue.

Windows 10 Build 1809
VSCode v1.32.3

@pycebs
Copy link

pycebs commented Apr 2, 2019

I have the same problem. I cannot use the cargo run/build/etc tasks anymore. They just disappeared.

Version: 1.32.3
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-21T22:49:07.188Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 5.0.5-arch1-1-ARCH

@dvic
Copy link
Contributor

dvic commented Apr 2, 2019

Same here.

@Xanewok
Copy link
Member

Xanewok commented Apr 2, 2019

Sorry for the breakage - I tried to test every change during work towards 0.6 but this must’ve slipped through during a refactor. I’m on it and will release 0.6.1 with the fix; hopefully this isn’t too disruptive for your workflow! For now you can work around this and specify your own build/test watch tasks using tasks.json definitions

@skrap
Copy link

skrap commented Apr 3, 2019

temporary workaround: context-click on the RLS extension in the extensions list, and select "Install Another Version..." to downgrade to 0.5.4.
image

@Xanewok
Copy link
Member

Xanewok commented Apr 4, 2019

Version 0.6.1 has been released with the fix - please let me know if the issue is fixed for you.

@pycebs
Copy link

pycebs commented Apr 4, 2019

Some options are back: cargo build, check, clean and test.

But cargo run is still missing. Any idea why?

@Xanewok
Copy link
Member

Xanewok commented Apr 4, 2019

That may be unpopular but I decided to leave out the run task to align more with what VSCode uses tasks for (build/rebuild/clean/test); the launch configuration is separated and handled differently. I'd love to investigate how we can hook up debugging to provide more first-class VSCode launch environment but decided to leave it out for now so that future transition to F5-style run/debug is more obvious.

Since the tasks are now back and working, I'll close the issue. Sorry for the inconvenience once more!

@Xanewok Xanewok closed this as completed Apr 4, 2019
@skrap
Copy link

skrap commented Apr 4, 2019

@Xanewok Thanks for the quick turnaround! So, to summarize, your intended replacement for cargo run is to create a launch.json entry for the cargo invocation in question, and then do "Start Debugging" or "Start Without Debugging" as desired?

@Xanewok
Copy link
Member

Xanewok commented Apr 4, 2019

Yep, that's the plan! https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb is a good extension and provides good out-of-box experience for Cargo projects so most likely this will either end up as an extension dependency (such that it's also installed alongside the current extension) or we'll strongly suggest to also install it manually if the user decides that they also want to interactively debug their code.

@jasonwilliams
Copy link
Member

@Xanewok what do i do if i just simply want to cargo run within vscode in the meantime?

@pycebs
Copy link

pycebs commented Apr 4, 2019

@Xanewok Oh no. I loved that cargo run functionality. I don't want to setup 100 different things. I installed my Rust plugin in VSCode and simply start using it. Is this you absolute final decision? I think extensions like this are supposed to make life easier for developers, so it's fine to have a built-in cargo run. And if you really wanna go with a task you can still do it that way as well.

@Xanewok
Copy link
Member

Xanewok commented Apr 5, 2019

There are never absolute final decisions =) I understand that and it seems fair; I agree that the decision was hasty and it'd be better to just give the user more choices to pick from rather than try to lock them in the explicit VSCode design.

I'll add back the cargo run task in the next point release.

However, I won't add back the cargo +nightly bench command since:

  1. it's nightly-only and limited to a specific rustc-internal bencher (there's seems to be a community consensus to move towards the great criterion package)
  2. there's currently an ongoing effort to make libtest (rustc-internal test and benchmarking harness) work on stable and move it out of Rust tree

Because of that, we'll add the bench command when the benchmarking story will be resolved and it will be usable on stable.

@skrap
Copy link

skrap commented Apr 5, 2019

@Xanewok This fix doesn't work for me. Could it be because I'm using a cargo workspace? I still have no tasks, even with 0.6.1. 0.5.4 works correctly.
If I open the directory containing the individual crate, building works, but all of the paths in the cargo output are cargo-workspace-relative, so none of the navigation features work properly.
If you'd rather I file a separate issue for this case, I'm happy to.

@Xanewok
Copy link
Member

Xanewok commented Apr 7, 2019

Cargo workspace means there's a Cargo.toml at the root, correct? If so, this should work as expected; if it doesn't, please file an issue with a simple repro project.

@bugproof
Copy link

Is there any way to make "Start Debugging" and "Start Without Debugging" work?

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

9 participants