Fork me on GitHub
#juxt
<
2016-02-18
>
ul09:02:58

is it a right place to discuss bidi-related things?

malcolmsparks14:02:54

Saves having to create channels for each juxt project

ul14:02:45

i have very strange bug in Chrome 48.0.2564.109

ul14:02:23

the point is that i use custom record extending Matched protocol as handler

ul14:02:41

and big routing table

ul14:02:10

and usually everything works fine, but in the fresh Chrome path-for returns nil

ul14:02:47

unresolve-handler is executed fine, and relevant branch is visited and returns ""

ul14:02:14

the problem is magically fixed when i do

(set! bidi/unmatch-pair
      (fn [v m]
        (when-let [r (bidi/unresolve-handler (second v) m)]
          (str (bidi/unmatch-pattern (first v) m) r))))

ul14:02:45

just redefine unmatch-pair with its original functionality

ul14:02:42

seems very odd for me, i don't know where to dig

ul14:02:14

in FF and older Chrome everything is fine

malcolmsparks15:02:35

@ul do you use handlers or keywords for targets? One guess is that equality on functions is broken in chrome's js somehow. I should think equality on keywords is more robust.

ul15:02:59

i use records as handlers, and equality for them works fine — I've debugged unresolve-handler, comparison of given handler with handler in leaf gives true when they are meant to be equal

malcolmsparks15:02:34

Can you strip things down to a small failing test-case?

ul16:02:53

I'll try.

ul16:02:32

sorry for the noise, issue survived several lein cleans, but now is gone

ul16:02:14

i'm inclined to think that was some kind of fluctuation 😃

malcolmsparks17:02:00

I'm not sure how cljs works underneath, it still seems like magic to me

ul18:02:58

yes, sometimes it break my heart