metabase / saml20-clj

A Clojure SAML 2.0 library for SSO
35 stars 12 forks source link

bug printing in-memory state manager in REPL #27

Open camsaul opened 4 years ago

camsaul commented 4 years ago
metabase-enterprise.sso.integrations.saml> state-manager
Error printing return value (IllegalArgumentException) at clojure.lang.MultiFn/findAndCacheBestMethod (MultiFn.java:179).
Multiple methods in multimethod 'simple-dispatch' match dispatch value: class saml20_clj.state$in_memory_state_manager$reify__78851 -> interface clojure.lang.IDeref and interface pretty.core.PrettyPrintable, and neither is preferred

we need to add a preference to use the PrettyPrintable method for PPrint simple-dispatch

simongray commented 3 years ago
(prefer-method print-method pretty.core.PrettyPrintable saml20-clj.state/StateManager)
(prefer-method print-method pretty.core.PrettyPrintable clojure.lang.IDeref)

This should fix the issue.