Skip to content

Commit

Permalink
Fix on Cljs 1.10.238 (#7)
Browse files Browse the repository at this point in the history
* Update Boot and deps

* Use correct MapEntry type on Cljs

This type exists since Cljs 1.9.456

* Fix tag readers on Cljs
  • Loading branch information
Deraen authored and frankiesardo committed Mar 27, 2018
1 parent c1576a1 commit e13c742
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions boot.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#https://github.com/boot-clj/boot
#Thu Sep 10 15:11:07 BST 2015
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.2.0
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.7.2
21 changes: 9 additions & 12 deletions build.boot
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
(set-env!
:resource-paths #{"src"}
:dependencies '[[adzerk/boot-cljs "0.0-3308-0" :scope "test"]
[adzerk/boot-cljs-repl "0.1.9" :scope "test"]
[crisptrutski/boot-cljs-test "0.1.0-SNAPSHOT" :scope "test"]
[collection-check "0.1.6" :scope "test"
:source-paths #{"test"}
:dependencies '[[adzerk/boot-cljs "2.1.4" :scope "test"]
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[crisptrutski/boot-cljs-test "0.3.5-SNAPSHOT" :scope "test"]
[org.clojure/clojurescript "1.10.238" :scope "test"]
[doo "0.1.8" :scope "test"]
[collection-check "0.1.7" :scope "test"
:exclusions [org.clojure/clojure]]])

(require
Expand Down Expand Up @@ -38,10 +41,6 @@
(comp (pom) (jar) (install)
(push :gpg-sign (not (.endsWith +version+ "-SNAPSHOT")))))

(deftask testing []
(set-env! :source-paths #(conj % "test"))
identity)

(ns-unmap 'boot.user 'test)

(require '[boot.pod :as pod]
Expand Down Expand Up @@ -84,13 +83,11 @@
fileset))))

(deftask test []
(comp (testing)
(test-clj)
(comp (test-clj)
(test-cljs :js-env :phantom
:exit? true)))

(deftask autotest []
(comp (testing)
(watch)
(comp (watch)
(test-clj)
(test-cljs :js-env :phantom)))
4 changes: 2 additions & 2 deletions src/linked/map.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@

(defn- map-entry [k v]
#?(:clj (MapEntry. k v)
:cljs (vector k v)))
:cljs (MapEntry. k v nil)))

(defn- visit-node [delegate-map current last direction]
(let [[k node] (find delegate-map current)
Expand Down Expand Up @@ -285,4 +285,4 @@

(def ->linked-map (partial into empty-linked-map))

#?(:cljs (reader/register-tag-parser! "linked/map" ->linked-map))
#?(:cljs (reader/register-tag-parser! 'linked/map ->linked-map))
2 changes: 1 addition & 1 deletion src/linked/set.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@

(def ->linked-set (partial into empty-linked-set))

#?(:cljs (reader/register-tag-parser! "linked/set" ->linked-set))
#?(:cljs (reader/register-tag-parser! 'linked/set ->linked-set))
9 changes: 6 additions & 3 deletions test/linked/map_test.cljc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns linked.map-test
(:require [linked.core :as linked]
#?@(:clj [[clojure.test :refer :all]
[collection-check :refer :all]
[clojure.test.check.generators :as gen]]
[collection-check.core :refer :all]
[clojure.test.check.generators :as gen]]
:cljs [[cljs.test :refer-macros [is are testing deftest run-tests]]])
#?(:cljs [cljs.reader :refer [read-string]])))

Expand Down Expand Up @@ -128,4 +128,7 @@
(let [o (read-string (pr-str s))]
#?(:clj (is (= linked.map.LinkedMap (type o))))
(is (= '([1 9] [3 4] [5 6] [7 8])
(seq o))))))
(seq o))))))

(deftest map-entry-test
(is (map-entry? (first (linked/map 1 2)))))
2 changes: 1 addition & 1 deletion test/linked/set_test.cljc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns linked.set-test
(:require [linked.core :as linked]
#?@(:clj [[clojure.test :refer :all]
[collection-check :refer :all]
[collection-check.core :refer :all]
[clojure.test.check.generators :as gen]]
:cljs [[cljs.test :refer-macros [is are testing deftest run-tests]]])
#?(:cljs [cljs.reader :refer [read-string]])))
Expand Down

0 comments on commit e13c742

Please sign in to comment.