-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*data-readers* not properly populated #47
Comments
From @micha's response on Question about data readers with datomic and boot:
I'd propose one of two solutions:
|
That said, adding |
Repro case of code/tmp ▸ boot -d com.datomic/datomic-free repl
nREPL server listening: 0.0.0.0:59826
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.6.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_20-b26
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from clojuredocs.org: [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
boot.user=> *data-readers*
{}
boot.user=> (#'clojure.core/load-data-readers)
{base64 #'datomic.codec/base-64-literal, db/fn #'datomic.function/construct, db/id #'datomic.db/id-literal}
boot.user=> *data-readers*
{}
boot.user=> (alter-var-root #'clojure.core/*data-readers* (constantly {:foo :bar}))
{:foo :bar}
boot.user=> *data-readers*
{} EDIT: It seems as if |
Derp again, it seems like further down in the aforementioned thread the updated suggestion is to run:
Seems convoluted enough to wrap up nicely for end users. (Anyways, I've hope you've enjoyed watching me go through the learning process...) |
Tripped upon this very same thing and got to the same solution. Also via the Hoplon forum. I tried using the REPLs |
Closing, but interested parties may consider moving what they found useful from Discourse and this thread to the wiki. |
Tripped on this, too. The workaround works, but brings complexity to the table, since running the code snippet makes sense in development under boot, but not in production where it's deployed as an artefact. |
This is fixed in https://github.com/danielsz/system For non-system users, you can try injecting the following task in your build pipeline. (deftask data-readers []
(fn [next-task]
(fn [fileset]
(#'clojure.core/load-data-readers)
(with-bindings {#'*data-readers* (.getRawRoot #'*data-readers*)}
(next-task fileset))))) |
which will cause *data-reader* symbol lose its values! I had researched hard and couldn't solved it , so commit it here error messages: "No reader function for tag db/id" please read those posts: boot-clj/boot#47 http://hoplon.discoursehosting.net/t/question-about-data-readers-with-datomic-and-boot/99
An update on anyone hitting this still, you can call: |
When using boot with Datomic, it seems as if
*data-readers*
is not being properly populated.In boot,
*data-readers*
is empty, even with Datomic included as a dependency:Whereas in Leiningen,
*data-readers*
contains Datomic'sdb/id
et al readers.The text was updated successfully, but these errors were encountered: