Run button is not working on Windows
lufog opened this issue · comments
Works fine here. This sounds like something Cargo-specific.
@rwols, all cargo actions from "Build With..." works fine. Could this be happening because I am using CARGO_HOME
and RUSTUP_HOME
environment variables, to redefine default locations for .cargo
and .rustup
folders?
upd:
Nope, .cargo
and .rustup
symlinks in user folder don't fixed the problem.
upd2:
I don't know Python, but I tried to investigate this. So I modified plugin.py and put in open_runnables_in_terminus func
print(terminus_args)
before
window.run_command("terminus_open", terminus_args)
To see if terminus_args valid. What I get:
{'title': 'run create-window', 'auto_close': False, 'cwd': 'E:\\Programming\\Windows.Education.Rust\\com.microsoft.windows-samples-rs\\create_window', 'cmd': ['cargo', 'run', '--package', 'create-window', '--bin', 'create-window']}
If I manually open the Terminus tab and paste the same thing into it, it works:
To exclude all possible errors from my side, I decided to check everything in a virtual machine with a clean operating system. What I did, step by step:
- installed Rust via
rustup-init.exe
with default parameters;
- downloaded portable
Sublime Text 4 Build 4121
for Windows; - installed
LSP
,LSP-rust-analizer
,Terminus
packages;
- created
hello_world
withcargo new
; - added
hellow_world
folder to editor viaProject
->Add folder to project
; - pressed
Run
button.
Hey so sorry about that , so do the args the LSP sends to terminus work fine? Like when run. Based on this I'm not sure exactly whats happening. Does Terminus work okay as well?
I am encountering the same problem, is anybody able to solve this on windows 10?
This seems like a Terminus issue, this aa.sublime-build
illustrates it (add this file to your sublime user folder and run a build with: aa
command on any file):
{
"cmd" : ["cargo"] , // this works
// "cmd" : ["cargo","--version"] , // this fails with couldn't determine self executable name
"target" : "terminus_exec",
}
Commenting out terminus_exec
target make both commands work (so does using exec
as a target)
There is this exact issue opened randy3k/Terminus#310, though no solutions there either
Found the solution — randy3k/Terminus#368 depends on a very old and buggy winpty, if you manually use the updated pypi versions of Terminus deps (in your Data\Lib\python38
as pypi has no 3.3 versions and some deps have a min py version above 3.3) and also install Terminus manually without package control (so that it doesn't auto-install those dependencies), then the Run button works!
Found the solution — randy3k/Terminus#368 depends on a very old and buggy winpty, if you manually use the updated pypi versions of Terminus deps (in your
Data\Lib\python38
as pypi has no 3.3 versions and some deps have a min py version above 3.3) and also install Terminus manually without package control (so that it doesn't auto-install those dependencies), then the Run button works!
@eugenesvk Can you help to provide more detailed guidance on how you performed to make this work? That can help a lot.