LanguageServer.jl
LanguageServer.jl copied to clipboard
Dependency name does not match UUID
Using language server with lsp-julia
on BTCParser.jl
on julia
v1.2
gives me the error below. On other packages it works fine. The versions of the packages can be seen here.
ERROR: EOFError: read end of file
stderr from client process:
ERROR: LoadError: Dependency name does not match UUID
Stacktrace:
[1] pkgerror(::String) at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:112
[2] validate_manifest(::Dict{String,Array{Pkg.Types.Stage1,1}}) at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/manifest.jl:111
[3] Dict{Base.UUID,Pkg.Types.PackageEntry}(::Dict{String,Any}) at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/manifest.jl:135
[4] #read_manifest#51(::String, ::typeof(Pkg.Types.read_manifest), ::IOStream) at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/manifest.jl:151
[5] #read_manifest at ./none:0 [inlined]
[6] #54 at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/manifest.jl:155 [inlined]
[7] #open#312(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(open), ::getfield(Pkg.Types, Symbol("##54#55")){String}, ::String) at ./iostream.jl:375
[8] open at ./iostream.jl:373 [inlined]
[9] read_manifest at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/manifest.jl:154 [inlined]
[10] Pkg.Types.EnvCache(::Nothing) at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:335
[11] Type at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:314 [inlined]
[12] Pkg.Types.Context() at ./util.jl:723
[13] top-level scope at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/clientprocess/clientprocess_main.jl:9
[14] include at ./boot.jl:328 [inlined]
[15] include_relative(::Module, ::String) at ./loading.jl:1094
[16] include(::Module, ::String) at ./Base.jl:31
[17] exec_options(::Base.JLOptions) at ./client.jl:295
[18] _start() at ./client.jl:464
in expression starting at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/clientprocess/clientprocess_main.jl:9
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] request(::SymbolServerProcess, ::Symbol, ::Nothing) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/SymbolServer.jl:53
[3] get_context(::SymbolServerProcess) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/SymbolServer.jl:66
[4] (::getfield(SymbolServer, Symbol("##SymbolServerProcess#3#4")))(::String, ::String, ::Type{SymbolServerProcess}) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/SymbolServer.jl:37
[5] Type at ./none:0 [inlined]
[6] run(::LanguageServerInstance) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/LanguageServer/src/languageserverinstance.jl:32
[7] top-level scope at none:1
caused by [exception 1]
EOFError: read end of file
Stacktrace:
[1] read at ./iobuffer.jl:212 [inlined]
[2] read(::Base.PipeEndpoint, ::Type{UInt8}) at ./stream.jl:856
[3] read(::Base.Process, ::Type{UInt8}) at ./io.jl:242
[4] deserialize at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Serialization/src/Serialization.jl:722 [inlined]
[5] deserialize(::Base.Process) at /home/gkraemer/progs/julia/julia-1.2/usr/share/julia/stdlib/v1.2/Serialization/src/Serialization.jl:709
[6] request(::SymbolServerProcess, ::Symbol, ::Nothing) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/SymbolServer.jl:45
[7] get_context(::SymbolServerProcess) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/SymbolServer.jl:66
[8] (::getfield(SymbolServer, Symbol("##SymbolServerProcess#3#4")))(::String, ::String, ::Type{SymbolServerProcess}) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/SymbolServer/src/SymbolServer.jl:37
[9] Type at ./none:0 [inlined]
[10] run(::LanguageServerInstance) at /home/gkraemer/.emacs.d/elpa/26.3/develop/lsp-julia-20190904.2119/languageserver/LanguageServer/src/languageserverinstance.jl:32
[11] top-level scope at none:1
Process julia-ls stderr finished
I did some changes to the uuids of the package and some dependencies, my best guess is the following:
The package and some dependencies did not match Pkg.METADATA_compatible_uuid($pkg)
and since Julia 1.2 this also caused an error when activating the environment.
julia> import Pkg; Pkg.activate("/home/gkraemer/progs/julia/BTCParser/")
ERROR: Dependency name does not match UUID
So I guess what LanguageServer.jl
has to do is to check if the uuid of the package and all dependencies matches Pkg.METADATA_compatible_uuid($pkg)
before doing anything. After changing the uuids to valid ones, everything seems to work fine. This is also probably something the general registry would have to check when registering anything.
An alternative explanation:
I also deleted Manifest.toml
at the end so it could also have been simply a mismatch of uuids between Manifold.toml
and Project.toml
that occurred when changing the uuids of the packages.