Fork me on GitHub
Petrus Theron13:07:40

I guess I could compile re-com with the patch myself, but I've never included a dependency that didn't come from Clojars before.


I don't know much about boot, but I assume you can: 1. Download the re-com repo 2. change what you need to (version of clj-time) 3. lein install to put a copy into your local maven repo (~/.m2) 4. use it.


Can I suggest asking this question on boot channel


Perhaps @sooheon is more there, than here


Just saw my mention, looking back at the problem petrus is having


So iirc, simply adding [com.andrewmcveigh/cljs-time "0.3.10"] as a dependency above re-com


Should work


Try adding that dependency, running boot show -p and checking to see the latest version is being used

Petrus Theron14:07:17

sweeeeet it builds now


@mikethompson: Have you run into any problems with programs trying to dispatch handlers before they are registered? I'm getting it happening off and on during my first load, but subsequent reloads in figwheel work fine. My initial load is being fired by so I think that's the culprit.


You probably have a require for handler.cljs in your core.cljs?


So the dependency loading mechanism (provided by google closure) which "orders" the loading of the js at runtime, will see only that handlers.cljs has to come in before core.cljs.


So ... the trick is to get handlers.cljs loaded BEFORE you do your first dispatch.


One brute force method (which might be ugly) is to find where you are dispatching, and up the top of that namespace, require in handlers.cljs @shaun-mahood: ^^^^


@mikethompson: Ok, I'll try that - should be pretty easy in this case, since all the dispatches are being done in one place. Thanks


Assuming I don't run into it again I'll do up a quick wiki entry for it


The biggest trap is not requiring handlers.cljs at all


And then the namespace doesn't get loaded at all


And every dispatch fails


I'm rebuilding my first re-frame app from scratch with re-com, amazing how much more it makes sense and better it works once I had some time playing with it


Always the way. Learning is just layers of the union. simple_smile I'd recommend re-reading my (overly long) readme too.


The other thing I ran into was with namespaced handlers, I had to dispatch them with the full namespace rather than the short form in my require statement. Confused the heck out of me for a bit.


require statement? Did you mean dispatch?


Hmm. No. I can't parse that last sentence


Ok, I'll elaborate and make it make sense.


Does that make sense?


These days, I don't use "real" namespaces in my id keywords. I use synthetic namespaces (ones without a real matching .cljs file)


So i use something like this; :panel1/add-thing


Even though there isn't really a panel1.cljs


oh, nice. I had been wondering about how to add ns


I've just stopped aliasing my require statements and it's consistent and understandable. Considered using synthetic namespaces but figured I'd keep it consistent with my other calls as well


Either way, namespacing handlers, subs and render functions has made it a lot easier for me to componentize things


@roberto to use the synthetic namespaces, just call (register-handler :panel1/add-thing) instead of (register-handler ::add-thing)


I'll try and write something up about namespaces on the wiki as well, and I think I have a good and consistent setup for using secretary that is working nicely with figwheel to add once I get it sorted out a bit better


@shaun-mahood a write up would be great! I have been interested in how people were going about this too.


@gadfly361: Yeah, about half the time I feel like I must be doing something wrong because it is so different from how I'm used to organizing things. I feel so free though, it's an amazing breath of fresh air compared to all the rigid frameworks I've used over the years. It's fun to feel like an idiot because I'm missing something fundamental, rather than feel like an idiot because I ran into another poorly specified or undocumented "feature" that I have to skim 3 textbooks to find, or because the I updated the framework to a new version with no breaking changes that breaks everything.


When I started with ClojureScript, I can remember rocking back in my chair when I realised the compiler was only about 900 lines of code ... and I could understand most of it (with effort). For the first time in a long while, the tech i was using didn't feel infinitely deep. Mind you, working in a browser takes away that feeling pretty quickly simple_smile


@shaun-mahood definitely a freeing feeling