Skip to content
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

cannot work with core.cache #22

Closed
hikoz opened this issue Jun 11, 2015 · 2 comments
Closed

cannot work with core.cache #22

hikoz opened this issue Jun 11, 2015 · 2 comments
Assignees

Comments

@hikoz
Copy link

hikoz commented Jun 11, 2015

puget.print/pprint failes when tried to print core.cache object.
It because you cannot sort Cache type.

You can reproduce with below.

(require '[leiningen.exec :refer [deps])
(deps '[[org.clojure/core.cache "0.6.4"]
        [mvxcvi/puget "0.8.1"]])
(require '[clojure.core.cache :as cache])
(require '[puget.printer :as puget])
(def c (cache/ttl-cache-factory {:a 1}))
(prn c)
(puget/cprint c)
@greglook
Copy link
Owner

Hmm, I'll take a look. As a workaround, you could use the :escape-types option to avoid pretty-printing these.

@greglook greglook self-assigned this Jun 11, 2015
@greglook
Copy link
Owner

With 0.9.0 you can specify a custom print handler for core.cache objects to get around this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants