Fork me on GitHub
#re-frame
<
2018-06-11
>
guy09:06:37

Hi, I'm following the tutorial for https://github.com/Day8/re-frame-template#deploy-to-heroku-if-using-handler However when i do the the step git push heroku master I get a exception

remote:        Caused by: clojure.lang.ExceptionInfo: No such namespace: day8.re-frame.tracing, could not locate day8/re_frame/tracing.cljs, day8/re_frame/tracing.cljc, or JavaScript source providing "day8.re-frame.tracing" in file /tmp/build_51664e52c171448f82df7b0f77921cd5/src/cljs/ccsoli/events.cljs {:tag :cljs/analysis-error}
Used these profiles:
lein new re-frame ccsoli +less +10x +re-frisk +test +aliases +handler +routes +re-pressed +re-com 
Is this an issue with heroku or perhaps re-frame-template? Apologies if this is the wrong place.

guy10:06:57

>+10x +re-frisk Ah maybe i was only supposed to have one of these?

guy10:06:39

Ah ok. When i remove +10x and created a new fresh project it worked

guy10:06:05

I think there might be some issue with the prod profile and the tracing stubs

reefersleep10:06:32

I’ve got re-frisk and 10x working side by side in one project. I wouldn’t push them to prod, though 🙂

guy10:06:43

Yeah i think that was a red herring

guy10:06:13

either way i've made an issue for the re-frame-template repo

guy10:06:01

ok figured it out

guy10:06:44

When Heroku runs the project it uses lein uberjar The project readme says to use lein with-profile uberjar So i just added those to the heroku env vars more or less and it works

guy10:06:20

ill update the issue too

Hukka11:06:47

re-frame gui setting defaults: put them in the db in the beginning, or use default clauses in subs, when the requested part of db doesn't exist?

Hukka12:06:34

I can see the point of seeing the starting state of the db in one place, but then the meaning is disconnected compared to being right there with the subscription handler code

manutter5112:06:22

I tend to have a namespace like my-project.db that does something like

manutter5112:06:02

(ns my-project.db
  (:require [my-project.module1 ;as mod1]
            [my-project.module2 :as mod2]
            ... etc)
(def db-defaults {:some-top-level-val :foo 
                :mod1 mod1/db-defaults
                :mod2 mod2/db-defaults
                ...)

manutter5112:06:15

so as I have specific modules or components or whatever, I define their db defaults (with def) in the module or component ns, and include them in the top-level parent.

manutter5112:06:43

Or for more complex subsystems, just repeat the process, like a tree.

manutter5112:06:18

I use def instead of defining a function because my default values don’t change. Other functions might redefine a db value later, like if I want to reset a form, but my initial state is all defs.

lumpy13:06:51

Anyone have a good pattern for click out. Trying to close a dropdown when you click outside the element. Currently have to use a ref. Was wondering if there was a more re-framey way.

Hukka13:06:22

Hmh. I seem to get chrome "paused before potential out-of-memory crash" often. Not sure if it's re-frame, reagent, re-frame-10x or my code

Hukka13:06:28

Is there a nice way to profile re-frame code?

danielcompton20:06:31

Chrome devtools are pretty good for low level stuff

danielcompton20:06:37

and re-frame-10x is good for a higher level view