tokamak icon indicating copy to clipboard operation
tokamak copied to clipboard

Toolchain detection doesn't work under Windows.

Open kevinpoitra opened this issue 9 years ago • 5 comments

When searching for toolchains, tokamak will issue a multirust list-toolchains command that seemingly drops its arguments somewhere along the way. This line here will report that multirust returned "This is the currently installed multirust binary." and will not exit until user interaction is done. This aligns with this issue issue created under the multirust-rs project, and entering only "multirust" in the command prompt shows the same message.

For reference, I'm on Windows 7.

kevinpoitra avatar Apr 05 '16 10:04 kevinpoitra

Hmmm. I thought my base for multirust as https://github.com/brson/multirust this repository. Seems like there is an alternative fully written in Rust(https://github.com/rust-lang-nursery/multirust-rs) if I got it correctly. I want to implement it too, but preferably after adding terminal support. If you want to help can you link your commit to this issue?

vertexclique avatar Apr 05 '16 10:04 vertexclique

Sure thing. What I understand so far is that runCommandOut in multirust-toolchain-view receives the list-toolchains args, and that it gets lost after being submitted to BufferedProcess. I'll look more into it.

kevinpoitra avatar Apr 05 '16 17:04 kevinpoitra

Okay, after looking into it, I've found a few issues. Firstly, doing multirust self update only updates to the next immediate version, instead of the latest, meaning that I had a very old installation of multirust-rs. multirust-rs in itself is being renamed to rustup, and has a different command scheme (rustup toolchain list, for example). Would you want to support solely rustup, or both rustup and multirust?

kevinpoitra avatar Apr 05 '16 19:04 kevinpoitra

Hmm, I think both will be better choice. At the end we can show an option to choose among each other to user with SelectListView.

vertexclique avatar Apr 06 '16 00:04 vertexclique

I think so as well, or at least until rustup is considered to be stable (although, I have yet to run into any issues). I started implementing rustup support in order to figure out what's going on with the arguments being dropped, and from what I can tell, spawning the process synchronously (through the new Utils.runCommandOut) works and reports the correct toolchains. Spawning the process asynchronously causes for the bug to show up.

kevinpoitra avatar Apr 06 '16 01:04 kevinpoitra