Clojure-Sublimed icon indicating copy to clipboard operation
Clojure-Sublimed copied to clipboard

print-dup breaks socket repl

Open tonsky opened this issue 11 months ago • 0 comments

Evaluating this over socket repl fails:

(binding [*print-dup* true]
  (prn {:a 1}))

with

[ Clojure Sublimed ] SND {"id" 12, "op" "eval", "ns" "user", "print_quota" 4096, "code" "(binding [*print-dup* true]
  (prn {:a 1}))", "line" 1, "column" 0}
[ Clojure Sublimed ] RCV #=(clojure.lang.PersistentTreeMap/create {"form" "(binding [*print-dup* true]\n  (prn {:a 1}))", "from_column" #=(java.lang.Integer. "0"), "from_line" #=(java.lang.Integer. "1"), "id" 12, "idx" 0, "tag" "out", "to_column" #=(java.lang.Integer. "16"), "to_line" #=(java.lang.Integer. "2"), "val" "#=(clojure.lang.PersistentArrayMap/create {:a 1})\n"})
Exception in thread Thread-9:
Traceback (most recent call last):
  File "./python3.8/threading.py", line 932, in _bootstrap_inner
  File "./python3.8/threading.py", line 870, in run
  File "/Users/tonsky/Library/Application Support/Sublime Text/Packages/Clojure Sublimed/cs_conn_socket_repl.py", line 57, in read_loop
    self.handle_msg(msg)
  File "/Users/tonsky/Library/Application Support/Sublime Text/Packages/Clojure Sublimed/cs_conn_socket_repl.py", line 191, in handle_msg
    self.handle_value(msg) \
  File "/Users/tonsky/Library/Application Support/Sublime Text/Packages/Clojure Sublimed/cs_conn_socket_repl.py", line 142, in handle_value
    if 'ret' == msg['tag']:
KeyError: 'tag'

tonsky avatar Feb 11 '25 17:02 tonsky