Setting up Julia in Visual Studio Code?

Hi all!

I wonder if you can help me here with something Julia and VSC related

I used to work with Atom as a Julia IDE. Now that Atom is gone, I hear everyone is using VSC.

In my clean new s MAC OS system I installed Julia 1.9 beta (downloaded the .dmg, moved the file to Applications, and added the bin to the tcsh path).

I installed VSC and downloaded the Julia package, and put the path to the bin.

I keep getting this messages:

and the next log output:

The Language Server failed to precompile.
Please make sure you have permissions to write to the LS depot path at
/Users/andurin/Library/Application Support/Code/User/globalStorage/julialang.language-julia/lsdepot/v1

┌ Error: Some Julia code in the VS Code extension crashed
â”” @ Main ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/error_handler.jl:15
ERROR: Failed to precompile LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7] to “/Users/andurin/Library/Application Support/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/LanguageServer/jl_TjdsR4”.
Stacktrace:
[1] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/languageserver/main.jl:77
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:456
[3] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:307
[4] _start()
@ Base ./client.jl:522
[Info - 2:18:31 PM] Connection to server got closed. Server will restart.
[Error - 2:18:31 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 2:18:31 PM] Julia Language Server client: couldn’t create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 2:18:31 PM] Restarting server failed
Message: Pending response rejected since connection got disposed
Code: -32097
Activating project at ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/environments/languageserver/fallback
[ Info: Starting the Julia Language Server
ERROR: LoadError: ArgumentError: Package DelimitedFiles [8bb1440f-4735-579b-a4ab-409b98df4dab] is required but does not seem to be installed:

  • Run Pkg.instantiate() to install all recorded dependencies.

Stacktrace:
[1] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1681
[2] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1567
[3] macro expansion
@ ./loading.jl:1555 [inlined]
[4] macro expansion
@ ./lock.jl:267 [inlined]
[5] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1518
[6] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/Compat/src/deprecated.jl:23
[7] eval(m::Module, e::Any)
@ Core ./boot.jl:370
[8] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/Compat/src/deprecated.jl:22
[9] include(mod::Module, _path::String)
@ Base ./Base.jl:456
[10] include(x::String)
@ Compat ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/Compat/src/Compat.jl:1
[11] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/Compat/src/Compat.jl:1328
[12] include
@ ./Base.jl:456 [inlined]
[13] 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:1952
[14] top-level scope
@ stdin:2
in expression starting at /Users/andurin/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/Compat/src/deprecated.jl:18
in expression starting at /Users/andurin/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/Compat/src/Compat.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile Compat [34da2185-b29b-5c13-b0c7-acf172513d20] to “/Users/andurin/Library/Application Support/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/Compat/jl_mAMaU4”.
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)
@ Base ./loading.jl:2195
[3] compilecache
@ ./loading.jl:2068 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1712
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1567
[6] macro expansion
@ ./loading.jl:1555 [inlined]
[7] macro expansion
@ ./lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1518
[9] include
@ ./Base.jl:456 [inlined]
[10] 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:1952
[11] top-level scope
@ stdin:2
in expression starting at /Users/andurin/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/DataStructures/src/DataStructures.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile DataStructures [864edb3b-99cc-5e75-8d2d-829cb0a9cfe8] to “/Users/andurin/Library/Application Support/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/DataStructures/jl_Ubvx6y”.
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)
@ Base ./loading.jl:2195
[3] compilecache
@ ./loading.jl:2068 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1712
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1567
[6] macro expansion
@ ./loading.jl:1555 [inlined]
[7] macro expansion
@ ./lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1518
[9] include
@ ./Base.jl:456 [inlined]
[10] 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:1952
[11] top-level scope
@ stdin:2
in expression starting at /Users/andurin/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/JuliaFormatter/src/JuliaFormatter.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile JuliaFormatter [98e50ef6-434e-11e9-1051-2b60c6c9e899] to “/Users/andurin/Library/Application Support/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/JuliaFormatter/jl_wdbaVX”.
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)
@ Base ./loading.jl:2195
[3] compilecache
@ ./loading.jl:2068 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1712
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1567
[6] macro expansion
@ ./loading.jl:1555 [inlined]
[7] macro expansion
@ ./lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1518
[9] include
@ ./Base.jl:456 [inlined]
[10] 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:1952
[11] top-level scope
@ stdin:2
in expression starting at /Users/andurin/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/LanguageServer/src/LanguageServer.jl:1
in expression starting at stdin:2

1 Like

Duplicate of:

Github issue:

As per the first link, try switching to a pre-release version of the VSCode extension.

1 Like

Thanks!