Skip to content

Commit

Permalink
Add read-handlers for prior code layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
whilo committed Feb 2, 2020
1 parent 5775714 commit aa7ab6e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
8 changes: 6 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(defproject io.replikativ/hitchhiker-tree "0.1.5-SNAPSHOT"
(defproject io.replikativ/hitchhiker-tree "0.1.6"
:description "A Hitchhiker Tree Library"
:url "https://github.com/dgrnbrg/hitchhiker-tree"
:url "https://github.com/replikativ/hitchhiker-tree"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
Expand Down Expand Up @@ -34,6 +34,10 @@
:init (set! *print-length* 50)}}}
:clean-targets ^{:protect false} ["resources/public/js" "target"]

:deploy-repositories [["clojars" {:url "https://clojars.org/repo"
:username :env/clojars_username
:password :env/clojars_password
:sign-releases false}]]

:cljsbuild {:builds
[{:id "dev"
Expand Down
23 changes: 22 additions & 1 deletion src/hitchhiker/tree/bootstrap/konserve.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,28 @@
'hitchhiker.tree.messaging.DeleteOp
msg/map->DeleteOp
'hitchhiker.tree.Config
tree/map->Config})
tree/map->Config

;; support pre-refactoring 0.1.5 hitchhiker-tree record names
'hitchhiker.konserve.KonserveAddr
(fn [{:keys [last-key konserve-key]}]
(konserve-addr store
last-key
konserve-key))
'hitchhiker.tree.core.DataNode
(fn [{:keys [children cfg] :as d}]
(tree/data-node (into (sorted-map-by c/-compare)
children)
cfg))
'hitchhiker.tree.core.IndexNode
(fn [{:keys [children cfg op-buf]}]
(tree/index-node (vec children)
(vec op-buf)
cfg))
'hitchhiker.tree.core.Config
tree/map->Config

})
(swap! (:write-handlers store)
merge
{'hitchhiker.tree.bootstrap.konserve.KonserveAddr
Expand Down

0 comments on commit aa7ab6e

Please sign in to comment.