Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim
https://codeium.com
MIT License
3.68k stars 124 forks source link

No suggestions when using 1.6.39 #354

Open CervEdin opened 2 months ago

CervEdin commented 2 months ago

Tried another codeium instance, version 1.6.39 and I'm not getting any suggestions.

I'm using version 1.6.28 (on another codeium instance) and it's working fine.

Hard to provide much in the way of useful debugging information, for example, not sure which version the language server on my system is running.

Digging around, the language server integration looks like a possible culprit.

cd ~ && find .local/share/.codeium/bin/ -ls
     4393      4 drwxr-xr-x   4 erik     erik         4096 Apr 18 10:45 .local/share/.codeium/bin/
    63917      4 drwxr-xr-x   2 erik     erik         4096 Apr 18 10:45 .local/share/.codeium/bin/f485965568948013d9f47815917f2f1f3a99089d
    63927 124816 -rwxr-xr-x   1 erik     erik     127805376 Apr 18 10:45 .local/share/.codeium/bin/f485965568948013d9f47815917f2f1f3a99089d/language_server_linux_x64
    63657      4 drwxr-xr-x   2 erik     erik          4096 Apr 18 10:41 .local/share/.codeium/bin/c0233f8d8a2279e99bfde38bb3cca2bb50dc8392
    63913     36 -rw-r--r--   1 erik     erik         34245 Apr 18 10:41 .local/share/.codeium/bin/c0233f8d8a2279e99bfde38bb3cca2bb50dc8392/language_server_linux_x64.gz

for one it doesn't look like the language server is extracted.

Also, the commit of tag 1.6.39 5b8f68d5c0e32ae97d073a56ff14dba5646ec223 is the same as 1.8.5 and I'm not sure if the language server version 1.8.5 is supposed to work with 1.6.39 or not

pqn commented 2 months ago

Can you try the latest commit?

CervEdin commented 2 months ago

@pqn makes no difference. Trying 1.6.36 didn't work either.

How can I debug this?

pqn commented 2 months ago

The code to do the extraction hasn't changed in recent memory. You could try manually unzipping it to see if it can skip that step.

CervEdin commented 2 months ago

The plot thickens. It's not a zip file, it's an HTML file with a 404

CervEdin commented 2 months ago

Pretty sure the problem is due to changes in commit fd440cd718742daab162241c5bd5857cd92f5f72 The download based on the portal url isn't working for me. The response of that curl is a 404 page and not the archive of the language server.

Looks like the code for extracting the archive isn't catching errors from gzip, rather it seems to happily make it executable. Since it's readable (a file which exists), it's not reported as an error.

  else
    if !executable('gzip')
      call codeium#log#Error('Failed to extract language server binary: missing `gzip`.')
      return ''
    endif
    call system('gzip -d ' . s:bin . '.gz')
    call system('chmod +x ' . s:bin)
  endif
  if !filereadable(s:bin)
    call codeium#log#Error('Failed to download language server binary.')
    return ''
  endif

Looks like I was able to solve this for myself by manually constructing the url and downloading it from the github url https://github.com/Exafunction/codeium/releases/download/language-server-v1.8.5/language_server_linux_x64.gz

Side note, there also appears to exists another version https://github.com/Exafunction/codeium/releases/download/language-server-v1.6.39/language_server_linux_x64.gz

which matches the tagged version of my plugin which I was instructed to install, but it appears the newer one is working ok 👌

pqn commented 2 months ago

FYI @fortenforge