non-Jedi / eglot-jl

Wrapper for using Julia LanguageServer.jl with emacs eglot
Creative Commons Zero v1.0 Universal
61 stars 11 forks source link

Update for compatibility with julia 1.4 #5

Closed non-Jedi closed 4 years ago

non-Jedi commented 4 years ago

Older pinned versions of Julia packages were incompatible with julia 1.4. Version were bumped and a more robust way of making sure the correct packages were found is added (by faffing about with LOAD_PATH).

fixes #4

@vvpisarev could you please confirm this works for you?

vvpisarev commented 4 years ago

I have to use "@:@stdlib for LOAD_PATH, otherwise Pkg can't be found.

Still crashes with the message

ERROR: LoadError: MethodError: no method matching length(::Nothing)
Closest candidates are:
  length(!Matched::Core.SimpleVector) at essentials.jl:596
  length(!Matched::Base.MethodList) at reflection.jl:852
  length(!Matched::Core.MethodTable) at reflection.jl:938
  ...
Stacktrace:
 [1] request_julia_config(::LanguageServerInstance) at /home/vvp/.julia/packages/LanguageServer/ZDdcC/src/requests/workspace.jl:84
non-Jedi commented 4 years ago

I think a different version of eglot-jl than the one in this PR must be loaded in your emacs. The eglot-jl.jl script in this PR no longer uses Pkg, so it shouldn't be an issue. EDIT: nope; I'm an idiot.

vvpisarev commented 4 years ago

Pkg.instantiate() in catch block. But even with @stdlib removed after the packages have been installed, still the same error.

non-Jedi commented 4 years ago

Pushed a commit fixing first problem. Looking into the second one now. Thanks for your patience/help here.

non-Jedi commented 4 years ago

I'm merging this as it improved eglot-jl from completely broken to quite functional on my computer. Will try to address #3 separately.