{"action":"created","issue":{"url":"https://api.github.com/repos/venantius/ultra/issues/17","labels_url":"https://api.github.com/repos/venantius/ultra/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/venantius/ultra/issues/17/comments","events_url":"https://api.github.com/repos/venantius/ultra/issues/17/events","html_url":"https://github.com/venantius/ultra/issues/17","id":58363279,"number":17,"title":"Fails with future returned by Datomic.","user":{"login":"benkamphaus","id":6155829,"avatar_url":"https://avatars.githubusercontent.com/u/6155829?v=3","gravatar_id":"","url":"https://api.github.com/users/benkamphaus","html_url":"https://github.com/benkamphaus","followers_url":"https://api.github.com/users/benkamphaus/followers","following_url":"https://api.github.com/users/benkamphaus/following{/other_user}","gists_url":"https://api.github.com/users/benkamphaus/gists{/gist_id}","starred_url":"https://api.github.com/users/benkamphaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkamphaus/subscriptions","organizations_url":"https://api.github.com/users/benkamphaus/orgs","repos_url":"https://api.github.com/users/benkamphaus/repos","events_url":"https://api.github.com/users/benkamphaus/events{/privacy}","received_events_url":"https://api.github.com/users/benkamphaus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-20T14:55:14Z","updated_at":"2015-03-03T01:47:41Z","closed_at":null,"body":"Hi I've been playing around with ultra and enjoying it a lot. Unfortunately, most of the work I do at the repl is with Datomic and there's presently an issue with handling the deref of the future returned by a datomic transaction. If you include Datomic free in a library, this is a simple reproduce case:\r\n\r\n```clojure\r\n(require '[datomic.api :as d])\r\n\r\n(def db-uri \"datomic:mem://test\")\r\n(d/create-database db-uri)\r\n(def conn (d/connect db-uri))\r\n@(d/transact conn [{:db/id (d/tempid :db.part/user) :db/doc \"hello world\"}])\r\n```\r\n\r\nStacktrace:\r\n\r\n```\r\njava.lang.RuntimeException: Unable to convert: class datomic.btset.BTSet to Object[]\r\n                                                                  ...\r\n                                                clojure.core/to-array                core.clj:  333\r\n                                                    clojure.core/sort                core.clj: 2828\r\n                                                                  ...\r\n                                                   clojure.core/apply                core.clj:  626\r\n                                              clojure.core/partial/fn                core.clj: 2468\r\n                                                                  ...\r\n                                           puget.printer/sort-entries             printer.clj:  131\r\n                                            puget.printer/eval2715/fn             printer.clj:  236\r\n                                                                  ...\r\n                               puget.printer/canonize-map/canonize-kv             printer.clj:  253\r\n                                                  clojure.core/map/fn                core.clj: 2559\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/interleave/fn                core.clj: 3973\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                               clojure.core/drop/step                core.clj: 2646\r\n                                                 clojure.core/drop/fn                core.clj: 2650\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                                  clojure.core/map/fn                core.clj: 2551\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                                   clojure.core/apply                core.clj:  624\r\n                                                  clojure.core/mapcat                core.clj: 2586\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   28\r\n                                                  clojure.core/map/fn                core.clj: 2557\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                                   clojure.core/apply                core.clj:  624\r\n                                                  clojure.core/mapcat                core.clj: 2586\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   28\r\n                                             fipp.printer/eval2406/fn             printer.clj:   67\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   31\r\n                                                  clojure.core/map/fn                core.clj: 2557\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                                   clojure.core/apply                core.clj:  624\r\n                                                  clojure.core/mapcat                core.clj: 2586\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   28\r\n                                             fipp.printer/eval2394/fn             printer.clj:   55\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   31\r\n                                                  clojure.core/map/fn                core.clj: 2557\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                                   clojure.core/apply                core.clj:  624\r\n                                                  clojure.core/mapcat                core.clj: 2586\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   28\r\n                                             fipp.printer/eval2377/fn             printer.clj:   44\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   31\r\n                                                  clojure.core/map/fn                core.clj: 2557\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                                   clojure.core/apply                core.clj:  624\r\n                                                  clojure.core/mapcat                core.clj: 2586\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   28\r\n                                             fipp.printer/eval2377/fn             printer.clj:   44\r\n                                                                  ...\r\n                                               fipp.printer/serialize             printer.clj:   31\r\n                                                  clojure.core/map/fn                core.clj: 2559\r\n                                                                  ...\r\n                                                    clojure.core/next                core.clj:   64\r\n                                           clojure.core/concat/cat/fn                core.clj:  701\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                               clojure.core/concat/fn                core.clj:  685\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                                     clojure.core/seq                core.clj:  133\r\n                                           clojure.core/concat/cat/fn                core.clj:  694\r\n                                                                  ...\r\n                                              clojure.core/chunk-next                core.clj:  667\r\n                                            clojure.core.protocols/fn           protocols.clj:  101\r\n                                          clojure.core.protocols/fn/G           protocols.clj:   19\r\n                                    clojure.core.protocols/seq-reduce           protocols.clj:   31\r\n                                            clojure.core.protocols/fn           protocols.clj:   54\r\n                                          clojure.core.protocols/fn/G           protocols.clj:   13\r\n                      clojure.core.reducers/reducer/reify/coll-reduce            reducers.clj:  112\r\n                      clojure.core.reducers/reducer/reify/coll-reduce            reducers.clj:  112\r\n                      clojure.core.reducers/reducer/reify/coll-reduce            reducers.clj:  112\r\n                                                  clojure.core/reduce                core.clj: 6289\r\n                                              transduce.reducers/each            reducers.clj:   44\r\n                                      fipp.printer/pprint-document/fn             printer.clj:  215\r\n                                         fipp.printer/pprint-document             printer.clj:  209\r\n                                                 puget.printer/pprint             printer.clj:  389\r\n                                          puget.printer/pprint-str/fn             printer.clj:  398\r\n                                             puget.printer/pprint-str             printer.clj:  397\r\n                                            whidbey.render/render-str              render.clj:   15\r\n                                                                  ...\r\nclojure.tools.nrepl.middleware.render-values/wrap-renderer/reify/send       render_values.clj:   35\r\n     clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn/fn  interruptible_eval.clj:   79\r\n```\r\n\r\nWith ultra disabled, the output of the deref is:\r\n\r\n```clojure\r\n{:db-before datomic.db.Db@133188bf, :db-after datomic.db.Db@28cd0b35, :tx-data [#datom[13194139534312 50 #inst \"2015-02-20T14:48:52.680-00:00\" 13194139534312 true] #datom[17592186045417 62 \"hello world\" 13194139534312 true]], :tempids {-9223350046623220288 17592186045417}}\r\n```"},"comment":{"url":"https://api.github.com/repos/venantius/ultra/issues/comments/76871089","html_url":"https://github.com/venantius/ultra/issues/17#issuecomment-76871089","issue_url":"https://api.github.com/repos/venantius/ultra/issues/17","id":76871089,"user":{"login":"benkamphaus","id":6155829,"avatar_url":"https://avatars.githubusercontent.com/u/6155829?v=3","gravatar_id":"","url":"https://api.github.com/users/benkamphaus","html_url":"https://github.com/benkamphaus","followers_url":"https://api.github.com/users/benkamphaus/followers","following_url":"https://api.github.com/users/benkamphaus/following{/other_user}","gists_url":"https://api.github.com/users/benkamphaus/gists{/gist_id}","starred_url":"https://api.github.com/users/benkamphaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkamphaus/subscriptions","organizations_url":"https://api.github.com/users/benkamphaus/orgs","repos_url":"https://api.github.com/users/benkamphaus/repos","events_url":"https://api.github.com/users/benkamphaus/events{/privacy}","received_events_url":"https://api.github.com/users/benkamphaus/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T01:47:41Z","updated_at":"2015-03-03T01:47:41Z","body":"1.6.0"}}