Thank you for the reply. The code generated by Julia: Connect to external REPL
is:
pushfirst!(LOAD_PATH, raw"/root/.vscode-server/extensions/julialang.language-julia-1.7.12/scripts/packages");using VSCodeServer;popfirst!(LOAD_PATH);VSCodeServer.serve(raw"/tmp/vsc-jl-repl-35432058-03a7-41cb-92af-db7da7f746af"; is_dev = "DEBUG_MODE=true" in Base.ARGS, crashreporting_pipename = raw"/tmp/vsc-jl-cr-8c4d1f53-ac71-437b-9432-63dc8cd7686e");nothing # re-establishing connection with VSCode
This works the the first time but unfortunately the generated path:
/tmp/vsc-jl-repl-35432058-03a7-41cb-92af-db7da7f746af
changes every time the devcontainer is rebuilt or even opened locally and reopened as a container. Each of those times I manually call Julia: Connect to external REPL
from the command palette to get a new path that works, that I then manually change in the makefile, which defeats the purpose of the makefile.
Ideally Julia:Connect to external REPL
would also give me the code that generates the tmp path and I would paste that in the makefile.
One other thing, is that if I run the generated code twice form the same terminal without reopening the devcontainer, the second time it will fail. For context, say my makefile command looks like this:
runjob:
STAGE=Development cd /app; julia --project=. -e ' \
pushfirst!(LOAD_PATH, raw"/root/.vscode-server/extensions/julialang.language-julia-1.7.12/scripts/packages");using VSCodeServer;popfirst!(LOAD_PATH);VSCodeServer.serve(raw"/tmp/vsc-jl-repl-878d7a8e-1411-415e-8e8f-620dbac3de02"; is_dev = "DEBUG_MODE=true" in Base.ARGS, crashreporting_pipename = raw"/tmp/vsc-jl-cr-6100a566-74f1-48c5-9426-d97851c81be4");nothing # re-establishing connection with VSCode; \
using Pkg; include("src/tests/run_mock_job.jl")'
The first time I do make runjob
after pasting the code from Julia:Connect to external REPL
it will work but then If I do make runjob
again the VSCodeServer.serve(…) gives me this error:
ERROR: IOError: connect: no such file or directory (ENOENT)
Stacktrace:
[1] wait_connected(x::Base.PipeEndpoint)
@ Sockets /usr/local/julia/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:529
[2] connect
@ /usr/local/julia/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:564 [inlined]
[3] connect
@ /usr/local/julia/share/julia/stdlib/v1.8/Sockets/src/PipeServer.jl:103 [inlined]
[4] serve(args::String; is_dev::Bool, crashreporting_pipename::String)
@ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/VSCodeServer.jl:110
[5] top-level scope
@ none:2
Nonetheless, thanks for your reply