chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
jba 2020-09-18T14:08:16.000600Z

536870913 :db/txInstant #inst \"2020-09-18T13:38:12.010-00:00\" 5" #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22549)}] {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22546)}}}] #unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22551)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22552)}] #datahike/Datom [1 :db/ident :city_name 536870913 true] "0x1e560feb" "#datahike/Datom [1 :db/ident :city_name 536870913 true]" {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22550)}}}] #unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22554)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22555)}] #datahike/Datom [1 :db/valueType :db.type/string 536870913 true] "0x1935e078" "#datahike/Datom [1 :db/valueType :db.type/string 536870913 true]" {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22553)}}}] #unrepl/object [#unrepl/browsable [#unrepl.java/class [#unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22558)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22559)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22560)}]], #unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22561)}} 38]
[:prompt {:file "/home/jba/PROJECTS/playground/src/playground/db.clj", :line 29, :column 2, :offset 1576, clojure.core/*warn-on-reflection* false, clojure.core/*ns* #unrepl/browsable [#unrepl/ns playground.db #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22562)}]} 39]
[:prompt {:file "/home/jba/PROJECTS/playground/src/playground/db.clj", :line 30, :column 1, :offset 1577, clojure.core/*warn-on-reflection* false, clojure.core/*ns* #unrepl/browsable [#unrepl/ns playground.db #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22563)}]} 40]

jba 2020-09-18T14:12:55.001500Z

for the same eval nrepl return:

{:db-before ...
 :db-after ...
:tx-data [#datahike/Datom [536870915 :db/txInstant #inst "2020-09-18T14:11:11.183-00:00" 536870915 true]], :tempids {:db/current-tx 536870915}

mauricio.szabo 2020-09-18T14:13:11.001700Z

Not really - search for a place that returns :eval on wireshark. You'll see that the second argument of the vector that starts with :eval is a map that have duplicated keys

jba 2020-09-18T14:14:14.001900Z

that's the full eval:

[:eval #datahike.db.TxReport {:db-before #datahike.db.DB {}, :db-after #datahike.db.DB {1 :db/cardinality, 1 :db/ident, 1 :db/valueType, 536870913 :db/txInstant}, :tx-data [#unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22547)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22548)}] #datahike/Datom [536870913 :db/txInstant #inst "2020-09-18T13:38:12.010-00:00" 536870913 true] "0x707efc8b" #unrepl/string ["#datahike/Datom [536870913 :db/txInstant #inst \"2020-09-18T13:38:12.010-00:00\" 5" #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22549)}] {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22546)}}}] #unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22551)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22552)}] #datahike/Datom [1 :db/ident :city_name 536870913 true] "0x1e560feb" "#datahike/Datom [1 :db/ident :city_name 536870913 true]" {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22550)}}}] #unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22554)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22555)}] #datahike/Datom [1 :db/valueType :db.type/string 536870913 true] "0x1935e078" "#datahike/Datom [1 :db/valueType :db.type/string 536870913 true]" {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22553)}}}] #unrepl/object [#unrepl/browsable [#unrepl.java/class [#unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22558)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22559)}] #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22560)}]], #unrepl/... nil #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22561)}} 38]
[:prompt {:file "/home/jba/PROJECTS/playground/src/playground/db.clj", :line 29, :column 2, :offset 1576, clojure.core/*warn-on-reflection* false, clojure.core/*ns* #unrepl/browsable [#unrepl/ns playground.db #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22562)}]} 39]

jba 2020-09-18T14:17:46.002100Z

try to indent it correctly:

[:eval #datahike.db.TxReport 
 {:db-before #datahike.db.DB {},
  :db-after #datahike.db.DB {1 :db/cardinality, 1 :db/ident, 1 :db/valueType, 536870913 :db/txInstant},
  :tx-data [#unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22547)}] 
                                               #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22548)}] 
                            #datahike/Datom [536870913 :db/txInstant #inst "2020-09-18T13:38:12.010-00:00" 536870913 true] "0x707efc8b" 
                            #unrepl/string ["#datahike/Datom [536870913 :db/txInstant #inst \"2020-09-18T13:38:12.010-00:00\" 5" 
                                            #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22549)}] {:bean {#unrepl/... nil 
                                                                                                                                  #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22546)}}}] 
            #unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22551)}] 
                                               #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22552)}] 
                            #datahike/Datom [1 :db/ident :city_name 536870913 true] "0x1e560feb" "#datahike/Datom [1 :db/ident :city_name 536870913 true]" {:bean {#unrepl/... nil
                                                                                                                                                                   #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22550)}}}] 
            #unrepl/object [#unrepl/browsable [#unrepl.java/class [datahike.datom.Datom #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22554)}] 
                                               #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22555)}] 
                            #datahike/Datom [1 :db/valueType :db.type/string 536870913 true] "0x1935e078" "#datahike/Datom [1 :db/valueType :db.type/string 536870913 true]" {:bean {#unrepl/... nil 
                                                                                                                                                                                     #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22553)}}}] 
            #unrepl/object [#unrepl/browsable [#unrepl.java/class [#unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22558)}] 
                                               #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22559)}] 
                            #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22560)}]], 
  #unrepl/... nil
  #unrepl/... {:get (unrepl.repl$i9hjMxfOQ2IzbCA5TVia2QQEJNg/fetch :G__22561)}} 38]

jba 2020-09-18T14:24:00.002400Z

I see it now, it's coming from :db-after #datahike.db.DB {1 :db/cardinality, 1 :db/ident, 1 :db/valueType, 536870913 :db/txInstant} ?

mauricio.szabo 2020-09-18T14:24:35.002600Z

Yes, if you use pr-str, this error does not occur. To be honest, I have no idea why it happens with UNREPL

jba 2020-09-18T14:28:48.002800Z

nrepl return this `{:db-after #datahike/DB {:schema {:db/ident {:db/unique :db.unique/identity}, :city_name {:db/ident :city_name, :db/valueType :db.type/string, :db/cardinality :db.cardinality/one}, 1 :city_name}}}

jba 2020-09-18T14:29:40.003Z

for continuing the investigation I should try to reproduce it from a vanilla unrepl?

mauricio.szabo 2020-09-18T16:45:22.003300Z

I think it's easier to reproduce from a vanilla unrepl - you won't need the wireshark at all, only telnet and copy-pasting the UNREPL blob over the telnet connection

mauricio.szabo 2020-09-18T16:45:51.003500Z

The UNREPL blob is literally the contents of this file: https://github.com/mauricioszabo/repl-tooling/blob/master/resources/unrepl.clj