Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Remove metatransaction.core import that causes problem with mount. #1691

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scheduler/src/cook/components.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems overly specific in blaming metatransaction.core for the error. What if we have another namespace that causes the same error when require'd into the dependency tree? How did you trace the blame back to metatransaction.core? The first sentence on 343 has a typo, so it needs to be reworded anyway.

Maybe just mention the error and link to issue #1370 instead. I probably should have done something like that when I opened the issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to create the error only adding a dependency to metatransaction.core, and was able to make it go away by deleting the reference. The issue you found adding progress was because of this dependency chain: cook.progress -> cook.tools -> metatransaction.core. I reworded it.

(mount/start-with-args (cook.config/read-config config-file-path))
(pool/guard-invalid-default-pool (d/db datomic/conn))
(metrics-jvm/instrument-jvm)
Expand Down
1 change: 0 additions & 1 deletion scheduler/src/cook/quota.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down