mattn / vim-lsp-settings

Auto configurations for Language Server for vim-lsp
MIT License
1.29k stars 231 forks source link

install-terraform-ls.sh curling non-existant file #708

Closed drichardson closed 10 months ago

drichardson commented 10 months ago

LspInstallServer failed to install terraform-ls. When I ran the install-terraform-ls.sh script manually after setting set -x to show commands being run, I saw this:

[I]$ ./install-terraform-ls.sh
++ uname -s
++ tr '[:upper:]' '[:lower:]'
+ os=darwin
++ uname -m
++ tr '[:upper:]' '[:lower:]'
+ arch=arm64
+ case $os in
+ case $arch in
+ arch=arm64
+++ curl -Ls -o /dev/null -w '%{url_effective}' https://github.com/hashicorp/terraform-ls/releases/latest
++ basename https://github.com/hashicorp/terraform-ls/releases/tag/v0.32.3
+ version=v0.32.3
++ echo v0.32.3
++ cut -c2-
+ short_version=0.32.3
+ filename=terraform-ls_0.32.3
+ url=https://github.com/hashicorp/terraform-ls/releases/download/v0.32.3/terraform-ls_0.32.3_darwin_arm64.zip
+ filename=terraform-ls_0.32.3.zip
+ curl -L --progress-bar https://github.com/hashicorp/terraform-ls/releases/download/v0.32.3/terraform-ls_0.32.3_darwin_arm64.zip -o terraform-ls_0.32.3.zip
################################################################################################ 100.0%
+ unzip terraform-ls_0.32.3.zip
Archive:  terraform-ls_0.32.3.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of terraform-ls_0.32.3.zip or
        terraform-ls_0.32.3.zip.zip, and cannot find terraform-ls_0.32.3.zip.ZIP, period.
doug@dougs-mbp aws=eng_user k8s=dev+main-backend ~/.vim/pack/common/start/vim-lsp-settings/installer (9)
[I]$ ls *.zip
terraform-ls_0.32.3.zip
doug@dougs-mbp aws=eng_user k8s=dev+main-backend ~/.vim/pack/common/start/vim-lsp-settings/installer
[I]$ cat terraform-ls_0.32.3.zip
Not Founddoug@dougs-mbp aws=eng_user k8s=dev+main-backend ~/.vim/pack/common/start/vim-lsp-settings/installer

It appears that Hashicorp isn't building binaries for this server as part of their release process.

https://github.com/hashicorp/terraform-ls/releases/tag/v0.32.3

drichardson commented 10 months ago

Looks like binaries may have been moved somewhere else. https://github.com/hashicorp/terraform-ls/issues/1189#issuecomment-1436500163

drichardson commented 10 months ago

Yeah looks like it is here now. https://releases.hashicorp.com/terraform-ls/0.32.3/

drichardson commented 10 months ago

BTW it also looks like more arch's are supported now. The install limits to just darwin and linux, but hashicorp builds openbsd, solaris, and windows as well so that could be added in a follow on PR, assuming there are no other reasons for limiting installs to darwin and linux.

drichardson commented 10 months ago

whoops, lol, this is already fixed, my bad. I just was not up to date with the latest checkout.