We're updating the issue view to help you get more done. 

Rhino & Nashorn Socket REPLs don't share evaluation environment

Description

Clojure Socket REPLs share an evaluation environment.

For example, start up with

1 java -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}" -cp cljs.jar clojure.main

Then in one terminal

1 2 3 4 5 6 $ telnet 0 5555 Trying 0.0.0.0... Connected to localhost. Escape character is '^]'. user=> (def x 3) #'user/x

then if you go into another terminal

1 2 3 4 5 6 $ telnet 0 5555 Trying 0.0.0.0... Connected to localhost. Escape character is '^]'. user=> x 3

and in the original terminal where you started the socket REPL:

1 2 user=> x 3

Here is what I get with the Node Socket REPL (not sure if I'm starting it the right way):

1 java -Dclojure.server.repl="{:port 5555 :accept cljs.server.node/repl}" -cp cljs.jar clojure.main

First terminal:

1 2 3 4 5 6 7 $ telnet 0 5555 Trying 0.0.0.0... Connected to localhost. Escape character is '^]'. ClojureScript 1.10.160 cljs.user=> (def x 3) #'cljs.user/x

Second terminal:

1 2 3 4 5 6 7 8 $ telnet 0 5555 Trying 0.0.0.0... Connected to localhost. Escape character is '^]'. ClojureScript 1.10.160 cljs.user=> x WARNING: Use of undeclared Var cljs.user/x at line 1 <cljs repl> nil

Environment

None

Status

Assignee

Unassigned

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

None

Priority

Major