binaryage / cljs-devtools

A collection of Chrome DevTools enhancements for ClojureScript developers
Other
1.11k stars 51 forks source link

Value Formatting Error for a function type #43

Closed eoliphan closed 6 years ago

eoliphan commented 6 years ago

In CLJS DevTools 0.9.9, an exception was raised during value formatting.

Error: No protocol method IDeref.-deref defined for type function: function (){ return re_frame.core.subscribe.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("form","cur-field","form/cur-field",-1263496756),arg], null)); } at Object.cljs$core$missing_protocol [as missing_protocol] (core.cljs:316) at Object.cljs$core$_deref [as _deref] (core.cljs:671) at cljs$core$deref (core.cljs:1449) at core.cljs:4680 at cljs.core.map.cljs$core$IFn$_invoke$arity$2 (core.cljs:4680) at cljs.core.LazySeq.sval (core.cljs:3394) at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (core.cljs:3448) at Object.cljs$core$seq [as seq] (core.cljs:1210) at Object.cljs$core$pr_sequential_writer [as pr_sequential_writer] (core.cljs:9856) at cljs.core.LazySeq.cljs$core$IPrintWithWriter$_pr_writer$arity$3 (core.cljs:10139)

darwin commented 6 years ago

This is likely a bug in your code or some of your libraries. Specifically a bug in some custom printing code implemented via IPrintWithWriter protocol which throws during printing unexpected values.

darwin commented 6 years ago

It may as well be a problem in standard cljs core code which gets passed unexpected data to print. I would bet that this would throw the same way when trying to print the same data (without devtools being present).