rescript-lang / vim-rescript

MIT License
154 stars 15 forks source link

TypeHint and JumpToDefinition not working after 2.0.1 update #39

Closed frankychung closed 3 years ago

frankychung commented 3 years ago

I currently get errors for :RescriptTypeHint and :RescriptJumpToDefinition. (Format and build commands work fine.) I cloned https://github.com/rescript-lang/rescript-project-template which uses rescript 9.1.2 to make sure it wasn't something specific in my project. Opening the demo file there:

For :RescriptTypeHint, I get Type Info failed with exit code '1' For :RescriptJumpToDefinition, I get Analysis binary failed with exit code '1'

I normally use COC, which also doesn't work as expected, but figured it's related to the regular commands not working.

I installed the latest version of vim-rescript with plug. Just in case, I completely uninstalled it and reinstalled it. Going into my /plugged/vim-rescript/ folder I confirmed it's at latest version.

Previously I was using bs-platform 9.0.2 and an older of vim-rescript and it worked great. Just in case I also tried installing bs-platform in this project template repo I'm testing with but it has the same issue. I also have another linux machine that I went through the same steps with but that also had the same issue.

Here is my :RescriptInfo. If there is a way I can get more helpful errors above, or if I can try anything else to help debug, please let me know.

ReScript version: 9.1.2
Editor mode: modern (using rescript.exe instead of bsc / bsb)
Detected Config File: /potato/playground/rescript-project-template/bsconfig.json
Detected Project Root: /potato/playground/rescript-project-template
Detected rescript_analysis_exe: /root/.vim/plugged/vim-rescript/server/analysis_binaries/linux/rescript-editor-analysis.exe
Detected rescript_exe: /potato/playground/rescript-project-template/node_modules/rescript/linux/rescript.exe
Detected (legacy) rescript_bsc_exe: /potato/playground/rescript-project-template/node_modules/rescript/linux/bsc.exe
Bundled rescript server version: 1.1.1
amiralies commented 3 years ago

Can you try testing your analysis binary manually? try this: put

let foobar = 2

in your Demo.res and run this command

/root/.vim/plugged/vim-rescript/server/analysis_binaries/linux/rescript-editor-analysis.exe hover src/Demo.res 0 7
frankychung commented 3 years ago

Ah, I see it's an issue with my (rather old) system:

/root/.vim/plugged/vim-rescript/server/analysis_binaries/linux/rescript-editor-analysis.exe: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /root/.vim/plugged/vim-rescript/server/analysis_binaries/linux/rescript-editor-analysis.exe)

I'll go ahead and close this, thanks for helping me narrow down the problem!