-
Notifications
You must be signed in to change notification settings - Fork 81
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
MethodError: no method matching Union{Int64, String}(::String) #836
Comments
I have the same issue when I precompile LanguageServer with PackageCompiler. It works fine with the default sysimage. |
I'm also trying to use it from coc but have hit the same issue. What does a default sysimage mean? This is my language server configuration that borrows from docs: if executable('julia')
let languageservers['julia'] = {
\ 'command': 'julia',
\ 'args': ['--startup-file=no', '--history-file=no', '-e', '
\ using LanguageServer;
\ using Pkg;
\ import StaticLint;
\ import SymbolServer;
\ env_path = dirname(Pkg.Types.Context().env.project_file);
\ server = LanguageServer.LanguageServerInstance(stdin, stdout, env_path, "");
\ server.runlinter = true;
\ run(server);
\ '],
\ 'filetypes': ['julia']
\ }
endif Which means at first I'm not using coc-julia, just configuring the server directly. On |
I had a custom sysimage compiled with PackageCompiler.jl, though since Julia 1.6 that is no longer necessary for good performance. |
I managed to fix this problem by picking LanguageServer from master: julia> using Pkg
julia> Pkg.add(url="https://github.com/julia-vscode/LanguageServer.jl")
julia> Pkg.add("SymbolServer")
julia> Pkg.add("StaticLint") |
It seems that the root of this issue is that the tests fail on 3.2.0. If I run |
coc-julia is now fixed and avoids the problem. |
Hi,
trying to get this working this Coc neovim plugin. There were several issues regarding this problem but it never got solved.
Output channel: Julia Language Server Trace
ERROR:
[ Info: Indexing StaticLint...
MethodError: no method matching Union{Int64, String}(::String)
Stacktrace:
[1]
LanguageServer.InitializeParams
(
::
Dict{String,Any
}) at /home/user/.julia/packages/LanguageServer/y1ebo/src/protocol/initialize.jl:111
[2] dispatch_msg(::JSONRPC.JSONRPCEndpoint, ::JSONRPC.MsgDispatcher, ::Dict{String,Any}) at /home/user/.julia/packages/JSONRPC/1Kq3H/src/typed.jl:64
[3]
run(::LanguageServerInstance) at /home/user/.julia/packages/LanguageServer/y1ebo/src/languageserverinstance.jl:308
[4] top-level scope at none:1
[Info - 3:20:46 PM] Connection to server got closed. Server will restart.
[Error - 3:20:46 PM] /usr/bin/julia exited with code: 1
The text was updated successfully, but these errors were encountered: