-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clap install-binary fail #1111
Comments
It should be fixed in the latest commit of the master. Please pull and re-run |
Hmm, please run |
Do I need to install "1.83-x86_64-apple-darwin"? |
Yes, the compilation error you encountered in the initial comment is because of using an earlier Rust version (expect 1.83, but 1.79 is used instead). Just pushed another commit to try installing the missing toolchain automatically, please try again. If the problem persists, try to run |
The Vimscript API is nothing but a convenient way to invoke the cargo command on your system. Please make sure the binary can be compiled successfully on your system first, fixing the API is easy afterward. UPD: the error in your last comment can be fixed by this patch: diff --git a/autoload/clap/installer.vim b/autoload/clap/installer.vim
index 446ff68d..eb7bc622 100644
--- a/autoload/clap/installer.vim
+++ b/autoload/clap/installer.vim
@@ -117,7 +117,7 @@ function! clap#installer#build_maple() abort
endif
if empty(filter(split(system('rustup toolchain list')), 'v:val =~ l:rust_version'))
- let cmd = printf('rustup install %s && cargo +%s build --release', rust_version)
+ let cmd = printf('rustup install %s && cargo +%s build --release', rust_version, rust_version)
else
let cmd = printf('cargo +%s build --release', rust_version)
endif |
diff --git a/autoload/clap/installer.vim b/autoload/clap/installer.vim
index 446ff68..e5133c6 100644
--- a/autoload/clap/installer.vim
+++ b/autoload/clap/installer.vim
@@ -33,6 +33,8 @@ function! s:run_term(cmd, cwd, success_info, ErrorCallback) abort
let cmd = a:cmd
if has('win32')
let cmd = 'cmd.exe /c '.cmd
+ else
+ let cmd = &shell.' -c "'.cmd.'"'
endif
call term_start(cmd, {
\ 'curwin': 1,
@@ -117,9 +119,9 @@ function! clap#installer#build_maple() abort
endif
if empty(filter(split(system('rustup toolchain list')), 'v:val =~ l:rust_version'))
- let cmd = printf('rustup install %s && cargo +%s build --release', rust_version)
+ let cmd = printf('rustup install %s && rustup run %s cargo build --release', rust_version, rust_version)
else
- let cmd = printf('cargo +%s build --release', rust_version)
+ let cmd = printf('rustup run %s cargo build --release', rust_version)
endif
call s:run_term(cmd, s:plugin_root_dir, 'built maple binary successfully', {-> clap#helper#echo_warn('build maple failed')}) |
As I have said, try to run |
_Instructions:`Clap install-binary
Environment (please complete the following information):
Describe the bug
Clap debug
To Reproduce
Clap install-binary
The text was updated successfully, but these errors were encountered: