code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Bug]: Julia Extension REPL Terminal not restored after code-server window reload

Open alyst opened this issue 3 years ago • 7 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome 103
  • Local OS: Windows 10
  • Remote OS: Ubuntu 18
  • Remote Architecture: amd64
  • code-server --version: 4.5.1

Steps to Reproduce

  1. open code-server
  2. install Julia v1.7.3 (latest stable) on the remote
  3. install Julia extension (currently v1.6.28, can also reproduce with v1.6.24)
  4. start Julia REPL
  5. start normal (e.g. bash) session. Check Julia process id in the list of processes (there would be two Julia processes: one running LanguageServer main.jl, the REPL one runs terminalserver.jl).
  6. reload code-server window/tab

Expected

Upon reload Julia REPL is preserved. It was working with VS Code 4.2.0 (4.3.0 and 4.4.0 haver other problems in my setup, so I cannot test them) and Julia extension 1.6.24.

Actual

Julia REPL is not in the list of terminals, while the old Julia REPL process (the one that runs terminalserver.jl) is still running.

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • [X] I cannot reproduce this in VS Code.
  • [X] I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • [X] I am using HTTPS.

Notes

No response

alyst avatar Jul 30 '22 01:07 alyst

@benz0li are you able to reproduce this?

jsjoeio avatar Aug 01 '22 19:08 jsjoeio

@benz0li are you able to reproduce this?

Yes. Currently, this can be reproduced at https://demo.jupyter.b-data.ch with image Julia (base:latest) + code-server (=registry.gitlab.b-data.ch/julia/base:1.7.3 (code-server v4.5.1, Julia v1.7.3, Julia extension v1.6.28)).

It is not working with registry.gitlab.b-data.ch/julia/ver:1.7.2 (code-server v4.4.0, Julia v1.7.2, Julia extension v1.6.17) either.

It was last working with registry.gitlab.b-data.ch/julia/ver:1.7.1 (code-server v4.0.1, Julia v1.7.1, Julia extension v1.5.10) in my case.
ℹ️ I didn't release Julia images with code-server v4.1.0 or v4.3.0 and I skipped over v4.2.0 due to issues.

benz0li avatar Aug 01 '22 21:08 benz0li

Maybe this is because code-server behaves like a remote installation. According to the official documentation:

Persistent server sessions

When you close the VS Code window, the server-side REPL terminates by default. To make the REPL state persistent across sessions, you have to:

  1. Install tmux, a terminal multiplexer, on the server (e.g. with apt install tmux)
  2. Toggle the julia.persistentSession.enabled setting in the VS Code settings. Note that this setting is available only in the server installation of the Julia extensions, accessible from the "Remote ..." tab of settings: Location of the persistent sessions setting

Remote Development · Julia in VS Code > Persistent server sessions

benz0li avatar Aug 01 '22 21:08 benz0li

Does this issue happen in VS Code or GitHub Codespaces?

  • [x] I cannot reproduce this in VS Code.

@alyst How did you reproduce this in VS Code?

  • [x] I cannot reproduce this in GitHub Codespaces.

~~AFAIK The Julia extension does not work with GitHub Codespaces.~~ (https://github.com/julia-vscode/julia-vscode/issues/2557#issuecomment-968051434)

benz0li avatar Aug 01 '22 21:08 benz0li

How did you reproduce this in VS Code?

These were the required checkboxes. I think local VS Code doesn't apply here, and I don't have access to GitHub Codespaces.

Install tmux, a terminal multiplexer, on the server (e.g. with apt install tmux)

Yes, that's what the extension authors suggest, but I find this solution unusable due to tmux interaction with the mouse, its scroll buffer behaviour, copying, response time etc. code-server 4.2.0 + Julia extension 1.6.24 worked fine for me, and it does not look like in 1.6.28 they have specifically disabled/broke "native" remote Julia terminal. I have tried code-server 4.5.1 + extension 1.6.24, and it does not work.

alyst avatar Aug 01 '22 21:08 alyst

When I start a new Terminal:

[IPC Library: Pty Host]  WARN Shell integration cannot be enabled for executable "/usr/bin/zsh" and args undefined

Then, after reloading the code-server browser tab/window:

[...]
[IPC Library: Pty Host]  INFO Persistent process "1": Replaying 312 chars and 1 size events

And the Terminal is restored.

(code-server v4.5.1, Julia v1.7.3, Julia extension v1.6.28)

benz0li avatar Aug 02 '22 05:08 benz0li

When I start a new Julia REPL:

[IPC Library: Pty Host]  WARN Shell integration cannot be enabled for executable "/opt/julia/bin/julia" and args [
  '-i',
  '--banner=no',
  '--project=/opt/julia/local/share/julia/environments/v1.7',
  '/opt/code-server/lib/vscode/extensions/julialang.language-julia-1.6.17/scripts/terminalserver/terminalserver.jl',
  '/tmp/vsc-jl-repl-c60ae286-d040-431f-a691-e903b1172776',
  '/tmp/vsc-jl-cr-b45e317b-56ca-4d6c-a10c-fddc98d8ea27',
  'USE_REVISE=true',
  'USE_PLOTPANE=true',
  'USE_PROGRESS=true',
  'DEBUG_MODE=false'
]

Then, after reloading the code-server browser tab/window:

[nothing relevant]

And the Julia REPL is gone.

(code-server v4.5.1, Julia v1.7.3, Julia extension v1.6.28)


With code-server v4.0.1 I get the [IPC Library: Pty Host] INFO Persistent process "2": Replaying 264 chars and 1 size events message and the Julia REPL is restored.

benz0li avatar Aug 02 '22 06:08 benz0li