From 8ad434574e9c13d93d5b2eab9a78c8e543a33fbc Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Tue, 15 Nov 2016 17:46:38 -0800 Subject: [PATCH] Remove dependency on Tufte. Fixes #109. --- project.clj | 2 +- src/common/datomish/db.cljc | 4 ++-- src/common/datomish/transact.cljc | 4 ++-- src/common/datomish/tufte_stub.cljc | 14 ++++++++++++++ test/datomish/places/import_test.cljc | 4 ++-- 5 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 src/common/datomish/tufte_stub.cljc diff --git a/project.clj b/project.clj index 301c14bf..ef729f5d 100644 --- a/project.clj +++ b/project.clj @@ -8,7 +8,7 @@ [org.clojure/core.async "0.2.385"] [datascript "0.15.4"] [org.clojars.rnewman/honeysql "0.8.2"] - [com.taoensso/tufte "1.0.2"] + ;[com.taoensso/tufte "1.0.2"] [jamesmacaulay/cljs-promises "0.1.0"]] ;; The browser will never require from the .JAR anyway. diff --git a/src/common/datomish/db.cljc b/src/common/datomish/db.cljc index dcdf290c..16fc9105 100644 --- a/src/common/datomish/db.cljc +++ b/src/common/datomish/db.cljc @@ -19,8 +19,8 @@ [datomish.schema :as ds] [datomish.sqlite :as s] [datomish.sqlite-schema :as sqlite-schema] - [taoensso.tufte :as tufte - #?(:cljs :refer-macros :clj :refer) [defnp p profiled profile]] + [datomish.tufte-stub :as tufte + #?(:cljs :refer-macros :clj :refer) [p]] #?@(:clj [[datomish.pair-chan :refer [go-pair !]]]) #?@(:cljs [[datomish.pair-chan] diff --git a/src/common/datomish/transact.cljc b/src/common/datomish/transact.cljc index 47047441..718bcb47 100644 --- a/src/common/datomish/transact.cljc +++ b/src/common/datomish/transact.cljc @@ -22,8 +22,8 @@ [datomish.sqlite-schema :as sqlite-schema] [datomish.transact.bootstrap :as bootstrap] [datomish.transact.explode :as explode] - [taoensso.tufte :as tufte - #?(:cljs :refer-macros :clj :refer) [defnp p profiled profile]] + [datomish.tufte-stub :as tufte + #?(:cljs :refer-macros :clj :refer) [p]] #?@(:clj [[datomish.pair-chan :refer [go-pair !]]]) #?@(:cljs [[datomish.pair-chan] diff --git a/src/common/datomish/tufte_stub.cljc b/src/common/datomish/tufte_stub.cljc new file mode 100644 index 00000000..49f0c487 --- /dev/null +++ b/src/common/datomish/tufte_stub.cljc @@ -0,0 +1,14 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. + +(ns datomish.tufte-stub) + +;;; The real version of Tufte pulls in cljs.test, which pulls in +;;; pprint, which breaks the build in Firefox. + +(defmacro p [name & forms] + `(do ~@forms)) + +(defmacro profile [options & forms] + `(do ~@forms)) diff --git a/test/datomish/places/import_test.cljc b/test/datomish/places/import_test.cljc index af5a5ead..77ebd5cf 100644 --- a/test/datomish/places/import_test.cljc +++ b/test/datomish/places/import_test.cljc @@ -9,8 +9,8 @@ [datomish.node-tempfile-macros :refer [with-tempfile]] [cljs.core.async.macros :as a :refer [go]])) (:require - [taoensso.tufte :as tufte - #?(:cljs :refer-macros :clj :refer) [defnp p profiled profile]] + [datomish.tufte-stub :as tufte + #?(:cljs :refer-macros :clj :refer) [p profile]] [datomish.api :as d] [datomish.places.import :as pi] [datomish.util :as util #?(:cljs :refer-macros :clj :refer) [raise cond-let]]