dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
cmal 2016-12-12T03:02:00.000430Z

Does keys in :profiles such as :dev, :repl, :cljsbuild means I can use lein dev, lein repl , lein cljsbuild? Why does the lein figwheel dev work? Does lein figwheel dev use :dev profile?

2016-12-12T14:39:28.000451Z

@cmal: you should read this article about profiles:

2016-12-12T14:40:41.000454Z

TL;DR; it is complicated, some profiles are special and are used just based on naming convention, e.g. :repl or :dev, some others are used implicitly by leiningen plugins

2016-12-12T14:41:36.000455Z

when you run lein figwheel dev, the dev there has nothing to do with profiles, it means that figwheel will autostart “dev” build in your :cljsbuild :builds

2016-12-12T15:23:00.000456Z

@cmal I have just tested your project on my machine, I was able to reproduce the problem you are seeing. it is caused by another “automagical” leiningen behaviour, profiles get merged, if keys are maps, they get merged, but if they are something else like list, they get concat, and in some special cases something custom happens, one special case is :repl-options :init, the code there gets wrapped into a (do …) form which lists all forms from merged :repl-options :init in profiles

❤️ 1
2016-12-12T15:23:22.000457Z

long story short, delete :repl-options in :dev profile and it will work as expected

cmal 2016-12-12T15:55:35.000458Z

@darwin Thank you very much for your help and patient explanations. I will take a note here and then dive into the docs of lein to learn more.

2016-12-12T18:06:48.000459Z

@darwin Hello again, my friend and I have started enjoying Dirac. Thanks. Regarding the Dirac agent, what do you think to change its listening binding from 127.0.0.1 to 0.0.0.0? because (as you know) I am using the docker and the change would make my life easy (:

2016-12-12T18:09:28.000461Z

either set env variable DIRAC_AGENT__NREPL_TUNNEL__HOST, or pass config map to (dirac.agent/boot!) in your project.clj

2016-12-12T18:10:21.000464Z

here is how it gets propagated from the boot! call: https://github.com/binaryage/dirac/blob/master/src/agent/dirac/agent/impl.clj#L139

2016-12-12T18:12:55.000466Z

@tf0054 you might need to tell the runtime exact ip to connect to: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/prefs.cljs#L20

2016-12-12T18:13:23.000468Z

:agent-host and :agent-port there should match :nrepl-tunnel setting in the agent

2016-12-12T18:15:19.000469Z

Oh great! the setting can be changed with env setting. Thanks I will try that.