-
-
Notifications
You must be signed in to change notification settings - Fork 648
Closed
Labels
Description
Expected behavior
Submitting multiple forms will evaluate all forms. This is the behavior in a clojure repl:
user>
(def x 1)
(def y 2)
#'user/x
#'user/y
user> x
1
user> y
2
user>
Actual behavior
in clojurescript we see the following:
cljs.user>
(def x 1)
(def x 2)
#'cljs.user/x
cljs.user> x
1
cljs.user> y
Compile Warning <cljs repl> line:1 column:1
Use of undeclared Var cljs.user/y
1 y
^---
nil
cljs.user>
Steps to reproduce the problem
Just enter multiple forms at the repl.
They are going across the wire.
clojure transport messages:
(-->
id "14"
op "eval"
session "007861fc-3603-4e8e-adf9-ce6d176fc939"
time-stamp "2018-12-09 16:10:32.295353924"
code "
(def x 1)
(def y 2)"
column 7
content-type "true"
file "*cider-repl advent/2018:localhost:37507(clj)*"
line 45
ns "user"
)
(<--
id "14"
session "007861fc-3603-4e8e-adf9-ce6d176fc939"
time-stamp "2018-12-09 16:10:32.322515508"
ns "user"
value "#'user/x"
)
(<--
id "14"
session "007861fc-3603-4e8e-adf9-ce6d176fc939"
time-stamp "2018-12-09 16:10:32.341382745"
ns "user"
value "#'user/y"
)
(<--
id "14"
session "007861fc-3603-4e8e-adf9-ce6d176fc939"
time-stamp "2018-12-09 16:10:32.354978707"
status ("done")
)
clojurescript transport:
(-->
id "28"
op "eval"
session "d4c2344d-1f72-4d20-8919-6f92b3aec374"
time-stamp "2018-12-09 16:10:55.172964201"
code "
(def x 1)
(def x 2)"
column 12
content-type "true"
file "*cider-repl clojure/test.cljs:localhost:33751(cljs:figwheel-..."
line 90
ns "cljs.user"
)
(<--
id "28"
session "d4c2344d-1f72-4d20-8919-6f92b3aec374"
time-stamp "2018-12-09 16:10:55.193551650"
ns "cljs.user"
value "#'cljs.user/x"
)
(<--
id "28"
session "d4c2344d-1f72-4d20-8919-6f92b3aec374"
time-stamp "2018-12-09 16:10:55.213649256"
status ("done")
)
Environment & Version information
CIDER version information
built from master
Lein/Boot version
These projects are both clj based. The clojure is a simple deps.edn with clojure 1.10.0-rc4 and the clojurescript one is the result of running clojure -A:new figwheel-main test.cljs
using sean corfield's excellent utility.
Emacs version
built from master 27.0.50
Operating system
fedora 29