day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Error when opening the subscriptions panel #119

Closed p-himik closed 6 years ago

p-himik commented 6 years ago

Whenever I try to open the subscription panel, I get:

Error rendering component (in day8.re_frame.trace.devtools_outer > devtools outer > day8.re_frame.trace.components.container.devtools_inner > day8.re_frame.trace.panels.subs.subs_panel)

followed by

Uncaught Error: Cannot compare #:score{:media *} to :score/blues
    at Object.cljs$core$compare [as compare] (core.cljs:2366)
    at Function.cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4 (core.cljs:2379)
    at Function.cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2 (core.cljs:2377)
    at cljs.core.PersistentVector.cljs$core$IComparable$_compare$arity$2 (core.cljs:10006)
    at Object.cljs$core$_compare [as _compare] (core.cljs:807)
    at Object.cljs$core$compare [as compare] (core.cljs:2360)
    at Function.cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4 (core.cljs:2379)
    at Function.cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2 (core.cljs:2377)
    at cljs.core.PersistentVector.cljs$core$IComparable$_compare$arity$2 (core.cljs:10006)
    at Object.cljs$core$_compare [as _compare] (core.cljs:807)

I think it's probably because subscription vectors are compared without any checks, and I have subscriptions like [:q [:score/id 1] :score/blues] and [:q [:score/id 1] {:score/media '*}].

danielcompton commented 6 years ago

This is because we sort the subscription vectors, but those two values can't be sorted. We could probably sort based on the subscription keyword.

danielcompton commented 6 years ago

I've pushed a new version for this in 0.1.14-20171207.034045-3 can you let me know if it hasn't fixed the problem?