Can't start language server with nightly Julia, "Package REPL does not have StyledStrings in its dependencies"

Log head:

  Activating project at `~/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/environments/languageserver/fallback`
[ Info: Starting the Julia Language Server
ERROR: LoadError: ArgumentError: Package REPL does not have StyledStrings in its dependencies:
- Note that the following manifests in the load path were resolved with a different
  julia version, which may be the cause of the error:
    /home/nsajko/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/environments/languageserver/fallback/Manifest.toml (v1.8.2)
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have REPL checked out for development and have
  added StyledStrings as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with REPL
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1901 [inlined]
 [2] macro expansion
   @ ./lock.jl:273 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1873
 [4] #invoke_in_world#3
   @ ./essentials.jl:1059 [inlined]
 [5] invoke_in_world
   @ ./essentials.jl:1056 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1866
 [7] include
   @ ./Base.jl:556 [inlined]
 [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base ./loading.jl:2438
 [9] top-level scope
   @ stdin:4
in expression starting at /home/nsajko/tmp/jl/jl/julia-37ed82b289/share/julia/stdlib/v1.11/REPL/src/REPL.jl:3
in expression starting at stdin:4
ERROR: LoadError: Failed to precompile REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] to "/home/nsajko/.config/Code - OSS/User/globalStorage/julialang.language-julia-insider/lsdepot/v1/compiled/v1.11/REPL/jl_4xyOD6".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; reasons::Dict{String, Int64})
    @ Base ./loading.jl:2715
  [3] compilecache
    @ ./loading.jl:2582 [inlined]
  [4] (::Base.var"#1064#1065"{Base.PkgId})()
    @ Base ./loading.jl:2158
  [5] mkpidlock(f::Base.var"#1064#1065"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/tmp/jl/jl/julia-37ed82b289/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [6] #mkpidlock#6
    @ ~/tmp/jl/jl/julia-37ed82b289/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/tmp/jl/jl/julia-37ed82b289/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
  [8] #invokelatest#2
    @ ./essentials.jl:1027 [inlined]
  [9] invokelatest
    @ ./essentials.jl:1022 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#1064#1065"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3301
 [11] maybe_cachefile_lock
    @ ./loading.jl:3298 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2154
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1987
 [14] #invoke_in_world#3
    @ ./essentials.jl:1059 [inlined]
 [15] invoke_in_world
    @ ./essentials.jl:1056 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1978
 [17] macro expansion
    @ ./loading.jl:1916 [inlined]
 [18] macro expansion
    @ ./lock.jl:273 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1873
 [20] #invoke_in_world#3
    @ ./essentials.jl:1059 [inlined]
 [21] invoke_in_world
    @ ./essentials.jl:1056 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1866
 [23] include
    @ ./Base.jl:556 [inlined]
 [24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2438
 [25] top-level scope
    @ stdin:4
in expression starting at /home/nsajko/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/packages/LanguageServer/src/LanguageServer.jl:1
in expression starting at stdin:4


The Language Server failed to precompile.
Please make sure you have permissions to write to the LS depot path at
	/home/nsajko/.config/Code - OSS/User/globalStorage/julialang.language-julia-insider/lsdepot/v1

ā”Œ Error: Some Julia code in the VS Code extension crashed
ā”” @ Main ~/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/error_handler.jl:15
ERROR: Failed to precompile LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7] to "/home/nsajko/.config/Code - OSS/User/globalStorage/julialang.language-julia-insider/lsdepot/v1/compiled/v1.11/LanguageServer/jl_wrxjkT".
Stacktrace:
 [1] top-level scope
   @ ~/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/languageserver/main.jl:77
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:556
 [3] exec_options(opts::Base.JLOptions)
   @ Base ./client.jl:318
 [4] _start()
   @ Base ./client.jl:525
[Info  - 6:50:53 PM] Connection to server got closed. Server will restart.
[Error - 6:50:53 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:50:53 PM] Julia Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:50:53 PM] Sending request julia/getModuleAt failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
  Activating project at `~/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/environments/languageserver/fallback`
[ Info: Starting the Julia Language Server
ERROR: LoadError: ArgumentError: Package REPL does not have StyledStrings in its dependencies:
- Note that the following manifests in the load path were resolved with a different
  julia version, which may be the cause of the error:
    /home/nsajko/.vscode-oss/extensions/julialang.language-julia-insider-1.7.13-universal/scripts/environments/languageserver/fallback/Manifest.toml (v1.8.2)
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have REPL checked out for development and have
  added StyledStrings as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with REPL
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1901 [inlined]
 [2] macro expansion
   @ ./lock.jl:273 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1873
 [4] #invoke_in_world#3
   @ ./essentials.jl:1059 [inlined]
 [5] invoke_in_world
   @ ./essentials.jl:1056 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1866
 [7] include
   @ ./Base.jl:556 [inlined]
 [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base ./loading.jl:2438
 [9] top-level scope
   @ stdin:4
in expression starting at /home/nsajko/tmp/jl/jl/julia-37ed82b289/share/julia/stdlib/v1.11/REPL/src/REPL.jl:3
in expression starting at stdin:4

Related to this Julia issue: REPL does not have StyledStrings in its dependencies Ā· Issue #53176 Ā· JuliaLang/julia Ā· GitHub

Whatā€™s a simple workaround?

EDIT: I tried deleting all VS Code-related directories on the file system and then trying again, and I also tried deleting the mentioned Manifest.toml. No luck.

Donā€™t use Julia nightly, or donā€™t use the language serverā€¦ You are trying to use a combination that is not expected to workā€¦

Not helpful, and BTW it usually works.

4 Likes

Dear, Davidanthoff !

I have read your tutorial (ā€œuse nightly build for fallback envā€).
I try my best but I still do not understand how to apply your tutorial wisely.
Thanks for very much for reading this reply.
I really hope there will be a simple solution that I can understand
because Iā€™m really stupid!

Currently,
because of language and skill limitations
I am improving them.
I wish that one day soon
I will have more contributions.

Sincerely grateful to Juliaā€™s development team and supportive community.