Fork me on GitHub
#reagent
<
2018-06-30
>
Petrus Theron10:06:38

I’m getting this error on build after updating some deps on my Clj/Cljs boot project:

java.lang.ClassNotFoundException: cljs.analyzer
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: cljs.analyzer, compiling:(reagent/debug.clj:49:12)
Elapsed time: 9.531 sec
I’ve google all I can, upgraded my cljs version to latest, but no dice. Apparently this is related to javax.xml.bind being deprecated, but should supposedly be fixed in latest Cljs 1.10+. Can anyone help?

diego.videco19:06:30

Hello, I am using secretary with reagent. Everything works for simple routes, without params, but now I am trying to match a route with params and it does not work. My code looks like this:

(defn app-routes []
  (defroute "/" []
    (swap! state/app-state assoc :page :home))

  (defroute "/about" []
    (swap! state/app-state assoc :page :about))
      
  (defroute "/music/:single" [single]
    (swap! state/app-state assoc :single single)
    (swap! state/app-state assoc :page :music-single))

  (defroute "/music" []
    (swap! state/app-state assoc :page :music)))
In this case music/:single is not triggered when I click a link like Any ideas?

justinlee20:06:11

@diego.vid.eco do you have this hooked up to the html5 history because without that i think you have to use hashtag routes

diego.videco20:06:24

Oh yeah I did, just erased it from my code sample

justinlee20:06:50

delete the last route and see if it matches

justinlee20:06:57

it may be matching on /music

diego.videco20:06:12

Yes it seems to be matching music

diego.videco20:06:49

But I have my links in music, so…

justinlee20:06:18

well just for testing, try it without that route

justinlee20:06:31

i would have through it matches the first route declared

justinlee20:06:34

but maybe not

diego.videco20:06:21

think I found the error, it’s actually my history code 😞

diego.videco20:06:41

but thanks for the pointer, that helped find out the error