This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@timothypratley: the idea with that saying is that, because idiomatic tasks only depend on their configuration and the fileset, we don't need a clean
task
@timothypratley: but yes, middlewares can also build up a cache and diff incoming filesets, which is how a system like boot can be competitive with systems like make
If I’m running a server from a boot repl, what’s the best way / workflow to have the server update on changes?
@alejandro: have you seen https://github.com/pandeiro/boot-http ? I realize it is not ‘in the repl` but it seems like if you enable -R wrap-reload, it will take whatever you have saved, and if you really want REPL action it looks like you could modify the task to start an nrepl? (disclaimer: I am a new boot user)
alandipert: I see. So to contrast, make
is a run-many approach which can notice your artifact already exists and is newer than its dependencies. boot
doesn’t have the ‘already built’ concept, every build is fresh but can be long lived and detect change henceforth. I wonder if there will be appetite to use make to decide when to run boot o_O.
So I'm trying to set up a dev environment using a build.boot mostly copy-pasted from the tenzing app. Everything works fine, cljs files are compiling and the app is being served. The problem is that when my init function tries to re-render my reagent components on change using this:
I get this error:
Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element.
In my js consoleThe app renders fine the first time but if I make any changes to the source files the app dies with the error above trying to re-render.
sounds like a react lifecycle issue (I’m good at creating those!)
is the app so simple that it can’t be the code? or are you willing to paste some of the code?
Hmm it seems that when the boot reloads the code something is getting rid of the
<div id='app'>
completely. It's just gone from the html doccrikey!
@tomisme: I think your issue is in your routes ns
if i comment it out, reloading works great
(defn init []
(do ;(routes/app-routes)
(re-frame/dispatch-sync [:initialize-db])
(mount-root)
(.log js/console "Init done BOOOYA")))
when it is in, the dom has an ‘input’ rendered into it
in ta.routes if I
;(hook-browser-navigation!)
remove the hook-browser-navigation! call also reloading is working...well I guess that shouldn’t be surprising
oh i see
I copy-pasted the hook-browser-navigation function from a secretary example, I've yet to wrap my head around how the whole thing works
right, but why is (app-routes) being called on reload? it implies (init) is called instead of mount-root
probably the reload hook is connected to init instead of mount-root
but I’m not sure how to check that
oh great!
oh i see in the build.boot file
so, if only mount-root is called on reload, won't that mean that if I make changes to non-view related parts of the app that they won't be reloaded?
they will be
it is working great for me now
umm to explain why it is fine is hard
but instead just add a println somewhere in your code
and you’ll see it printed at the console
I mean the code is ALWAYS reloaded… the on-jsload is just called AFTER the code is loaded
working for you? (you need to restart the boot process)
btw love the UI, looks really great! good job seeing you are working in the education space you might be interested in http://leaderboardx.herokuapp.com/ <— I made a sociogram builder for teachers
Thankyou I'm a high school English teacher, I'm trying to learn clojurescript in the fraction of my time that's spare haha
o_O great!
groovy! goodnight
cljs.user=> (dir goog.string)
WARNING: Use of undeclared Var cljs.user/dir at line 1 <cljs repl>
ExceptionInfo #<TypeError: Cannot read property 'call' of undefined> clojure.core/ex-info (core.clj:4591)
cljs.user=> (require '[cljs.repl])
ExceptionInfo #<Error: Namespace "cljs.user" already declared.> clojure.core/ex-info (core.clj:4591)
cljs.user=>
Actually, none of the helper functionality from cljs.repl is available:
cljs.user=> (doc map)
WARNING: Use of undeclared Var cljs.user/doc at line 1 <cljs repl>
ExceptionInfo #<TypeError: Cannot read property 'call' of undefined> clojure.core/ex-info (core.clj:4591)
I have to say that boot-cljs-repl is really starting to feel like an unsupported mess, based on the lack of response to the github issues where it seems like fixes made by the community are stuck waiting for someone to do something with them. Am I wrong about this?
@meow: i can't disagree with you how feel
but i can say keeping up with upstream is a full time job
for a while there were weekly breaking changes
this drove us at one point to https://github.com/stabilized/clojurescript
things appear to be settling down, but i would say if you depend on tools that move with cljs regularly, it will just be tough for awhile
david nolen promises a slower pace this year, so i imagine things will become less brittle
that said - if you yourself have the time to keep track of things and are interested in maintainership, i'm happy to annoint you
@alandipert: thanks for the response. I do have the time and interest, but I'm not sure I'm fully qualified at this point as I am still learning clojure and clojurescript. Started with them on May 15, so it's been six weeks now.
@meow: in any case congrats on your incredible progress!
for work we're a few months behind in cljs releases, just for sanity purposes
i imagine if you're just starting, perhaps it would be helpful if you stick with known-good combinations of boot/cljs things?
to stay on the edge basically requires knowing the whole stack deeply
@alandipert: good advice that I won't follow - I always find myself on the edge 😉
So I'm going to stop complaining for the moment and look at the source code for boot-cljs-repl and the pull-requests on github and see if I would be comfortable working on it.
cool deal!
if you see anyone else complain, just threaten to make them a maintainer too
@alandipert: rofl
haha yes
a common feeling, the need to complain
so no sweat
Blogged about something today: http://tuppu.net/9de33a0a
@alandipert: Regarding Cljs versioning, if you have not yet heard David mentitioned on his talk that Cljs will probably start following Clojure versioning
As the Cljs anyway requires specific Clj version
@micha: What kind of typesetting you were thinking for console? 😮
#boot-cljs-repl, my vacation starts in a week and I should have more time to work on OS stuff (cljs-repl) then
so i can render manpages in java without needing the man(1) program to typeset the troff
Oh, I haven't ever checked how man pages are rendered
depending on shelling out to the man(1) program is annoying because it might not be available, etc
micha: it’s crazy like you will find tons of curses libraries to build GUI s in the terminal, but typesetting is a wasteland