From 965261b83407f48743dd82f7451ae28e6b2c09e0 Mon Sep 17 00:00:00 2001 From: Scott Crosby Date: Tue, 29 Sep 2020 18:03:59 -0500 Subject: [PATCH 1/3] Remove metatransaction.core import that causes problem with mount. # Conflicts: # scheduler/src/cook/quota.clj --- scheduler/src/cook/components.clj | 3 +++ scheduler/src/cook/quota.clj | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scheduler/src/cook/components.clj b/scheduler/src/cook/components.clj index 142f2069f7..82aeff95ed 100644 --- a/scheduler/src/cook/components.clj +++ b/scheduler/src/cook/components.clj @@ -338,6 +338,9 @@ (try ; Note: If the mount/start-with-args fails to initialize a defstate S, and/or you get weird errors on startup, ; you need to require S's namespace with ns :require. 'ns :require' is how mount finds defstates to initialize. + ; + ; If you get an error about "Can't embed object in code, maybe print-dup not defined: clojure.lang.Delay" + ; The issue is about metatransaction.core seems to be incompatible with mount. It cannot be in the dependency tree. (mount/start-with-args (cook.config/read-config config-file-path)) (pool/guard-invalid-default-pool (d/db datomic/conn)) (metrics-jvm/instrument-jvm) diff --git a/scheduler/src/cook/quota.clj b/scheduler/src/cook/quota.clj index b3db1d4130..ee5cbf0e1c 100644 --- a/scheduler/src/cook/quota.clj +++ b/scheduler/src/cook/quota.clj @@ -19,7 +19,6 @@ [cook.schema] [cook.tools :as util] [datomic.api :as d] - [metatransaction.core :refer [db]] [plumbing.core :as pc])) ;; This namespace is dangerously similar to cook.share (it was copied..) ;; it isn't obvious what the abstraction is, but there must be one. From 5a37d87090b9afafb1ca72e95718d1c7bf156bdf Mon Sep 17 00:00:00 2001 From: Scott Crosby Date: Wed, 30 Sep 2020 07:48:07 -0500 Subject: [PATCH 2/3] Clean up grammar per review --- scheduler/src/cook/components.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scheduler/src/cook/components.clj b/scheduler/src/cook/components.clj index 82aeff95ed..06338cf161 100644 --- a/scheduler/src/cook/components.clj +++ b/scheduler/src/cook/components.clj @@ -340,7 +340,8 @@ ; you need to require S's namespace with ns :require. 'ns :require' is how mount finds defstates to initialize. ; ; If you get an error about "Can't embed object in code, maybe print-dup not defined: clojure.lang.Delay" - ; The issue is about metatransaction.core seems to be incompatible with mount. It cannot be in the dependency tree. + ; The issue is that at least metatransaction.core seems to be incompatible with mount. It cannot be in the + ; dependency tree of anything using mount. (mount/start-with-args (cook.config/read-config config-file-path)) (pool/guard-invalid-default-pool (d/db datomic/conn)) (metrics-jvm/instrument-jvm) From 8e88293c0bd36a2d36430f3e6f593686ba4822b9 Mon Sep 17 00:00:00 2001 From: Scott Crosby Date: Wed, 30 Sep 2020 10:48:38 -0500 Subject: [PATCH 3/3] Add issue link --- scheduler/src/cook/components.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scheduler/src/cook/components.clj b/scheduler/src/cook/components.clj index 06338cf161..20621951e9 100644 --- a/scheduler/src/cook/components.clj +++ b/scheduler/src/cook/components.clj @@ -341,7 +341,7 @@ ; ; If you get an error about "Can't embed object in code, maybe print-dup not defined: clojure.lang.Delay" ; The issue is that at least metatransaction.core seems to be incompatible with mount. It cannot be in the - ; dependency tree of anything using mount. + ; dependency tree of anything using mount. See also issue #1370 (mount/start-with-args (cook.config/read-config config-file-path)) (pool/guard-invalid-default-pool (d/db datomic/conn)) (metrics-jvm/instrument-jvm)