This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-25
Channels
- # aatree (3)
- # admin-announcements (14)
- # aws (2)
- # beginners (23)
- # boot (58)
- # braid-chat (15)
- # cider (8)
- # clara (5)
- # cljs-dev (1)
- # cljsrn (38)
- # clojure (82)
- # clojure-china (2)
- # clojure-czech (16)
- # clojure-dev (11)
- # clojure-finland (1)
- # clojure-ireland (6)
- # clojure-japan (3)
- # clojure-portugal (1)
- # clojure-russia (152)
- # clojure-sg (7)
- # clojurebridge (3)
- # clojurescript (86)
- # code-reviews (3)
- # core-matrix (4)
- # cursive (25)
- # data-science (1)
- # datascript (2)
- # datavis (98)
- # datomic (21)
- # dirac (97)
- # emacs (1)
- # hoplon (1)
- # jobs (2)
- # ldnclj (21)
- # off-topic (3)
- # om (204)
- # pedestal (3)
- # proton (12)
- # reagent (125)
- # ring-swagger (9)
- # slackpocalypse (1)
- # spacemacs (1)
- # vim (1)
- # yada (19)
is there a good way to configure lein-cljsbuild
to only include cljs-devtools (and the namespaces that would call the setup functions) for certain lein-cljsbuild
profiles?
I ended up creating two source files for my thing.devtools
namespace, one of which is a dummy
@frank: your solution is fine, other solution could be to use lein’s profiles, also what I do is to goog.require namespaces manually, so that way I have control over exact order of inclusion namespace trees, devtools should be required early: https://github.com/binaryage/dirac/blob/master/resources/unpacked/background.js
unfortunately I don't think I can change too much about how we bootstrap our app at work 😕
also, I'm seeing a lot of "Use of undeclared var" warnings, even though it seems to evaluate just fine
do you have access to normal piggieback-based REPL? I would try it there if it behaves the same
I’m glad you were able to reproduce it in the demo project, I confirm the behaviour here on my OS X system, so I can investigate it further
I’m no expert in this nREPL stuff, this might point to some problem in dirac (n)REPL environment
I suppose it would be like the physicist. I'd hazard a guess the name was inspired by planck ; d
coming up with names is hard, as you all know, I like this new tradition naming projects after famous physicists
Then I'm curious what would a library called noether do ;' ) Her theory always makes me go whoa.
@frank: I have another way how to include devtools conditionally, you can call goog.require from your code based on some condition
look here: https://github.com/binaryage/cljs-devtools-sample/blob/master/src/demo/devtools_sample/boot.cljs#L31
debug? is a macro, which evals to env variable, which is defined here: https://github.com/binaryage/cljs-devtools-sample/blob/master/project.clj#L53
I actually tried a conditional goog require, but I sort of combined it with setting :source-paths
for lein-cljs
the devtools_sample.weasel must be in :source-paths, but must not be in any cljs ns :require
if you use macro for generating that condition, the optimizer should elide whole (when false <body>)
if that <test> in (when <test> …) is some more complex dynamic code it will stay there probably, but it won’t cause any harm, because it will eval to false anyway
so I guess I can use with-profile
together with lein-pprint
to see what the final config map looks like?
@frank: I have just test that warning issue with piggieback+weasel and the problem is there as well: https://gist.github.com/darwin/20bda519cf6742b460f6
now when I think about it more, I guess we have to require our namespace first somehow
when using clojure repl you also have to require namespaces before you can use vars from them
I think, in cljs it works by coincidence, warning is emitted, but generated code matches situation in the VM, so the result evaluates properly
unfortunately (require ‘devtools-sample.more) fails, maybe that REPL env needs some paths or some way how to require files
I want to work on integration with other nREPL clients, so they can eval code in Dirac REPL