This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-13
Channels
- # arachne (2)
- # architecture (23)
- # bangalore-clj (5)
- # beginners (35)
- # boot (79)
- # cider (6)
- # cljs-dev (34)
- # cljsrn (9)
- # clojure (164)
- # clojure-argentina (2)
- # clojure-austin (4)
- # clojure-italy (7)
- # clojure-russia (40)
- # clojure-serbia (1)
- # clojure-spec (76)
- # clojure-uk (36)
- # clojurescript (47)
- # cursive (14)
- # datascript (2)
- # datomic (8)
- # dirac (19)
- # emacs (29)
- # heroku (7)
- # hoplon (35)
- # jobs-rus (1)
- # juxt (2)
- # leiningen (1)
- # lumo (23)
- # mount (4)
- # off-topic (22)
- # om (16)
- # onyx (19)
- # parinfer (10)
- # pedestal (47)
- # proton (5)
- # re-frame (88)
- # rum (1)
- # spacemacs (33)
- # sql (29)
- # uncomplicate (1)
- # unrepl (131)
- # untangled (5)
- # yada (12)
however, when I visit a.b.c.d from my tablet, my tablet tries to connect to <ws://127.0.0.1:5000> -- how ddo I tell the tablet to connect to <ws://a.b.c.d:5000> ?
I am running into the following problem: boot-reload websocket automatically closes on android tablet it appears to stay open fine on it's own on desktop/laptop however, if I use the android tablet, even though the android tablet does not shut down, and even though the screen is full brightness, and even though I have "in dev mode, while charging, do not sleep", it seems like after a while, the android tablet auto closes the websocket
hello folks - has anyone managed to make boot-reload work for when a static css file has changed? in my case it’s precompiled at build time with boot-garden. any hints or examples would be great.
@michael.heuberger if it is inside a watch and named ".css" it should be seen and reloaded, unless something weird is going on. You could also try boot-figreload
by the way in order to compare.
I have something like
(watch)
(garden :styles-var 'app.css/base)
...
and it works fine for me@richiardiandrea what do you mean with “inside a watch”?
can there be multiple “watch”?
watch
should come before reload
(but it should be already like this). No only one watch is allowed I think
Hi I’m trying to make myself a Boot task for the Migration library Migratus
, I’m having trouble using the fileset
aspect of Boot, this is my task, it’s pretty much copy paste of the example in the Boot wiki, it creates the files in the Boot tmp directories but not in my resources
directory.
(core/deftask migratus-generate
"Generate migration"
[n name NAME str "Name of generated migration."]
(let [tmp (core/tmp-dir!)]
(fn middleware [next-handler]
(fn handler [fileset]
(core/empty-dir! tmp)
(let [migration-dir (:migration-dir config) ;; That's db/migrations
migration-name (->kebab-case (str (timestamp) name))
migration-up-name (str migration-dir "/" migration-name ".up.sql")
migration-down-name (str migration-dir "/" migration-name ".down.sql")
up-file (io/file tmp migration-up-name)
down-file (io/file tmp migration-down-name)]
(io/make-parents up-file)
(io/make-parents down-file)
(.createNewFile up-file)
(.createNewFile down-file)
(-> fileset
(core/add-resource tmp)
core/commit!
next-handler))))))
is there anything that looks weird?
@clodeindustrie : what is (1) the expected behaviour and (2) the actual behaviour ?
(1) I want the files created from the createNewFile
in my resource
directory in my project
(2) those files are created in the tmp
dirs of Boot (in my case ~/.boot/......
but they are not persisted in my project when I core/commit!
which is what I was expecting that function to do
@clodeindustrie : I think the tasks you need to use are "sift" and "target"
right I think I’m missing the target task
looks like the commit!
only persists what is in the fileset and not in the physical temp directory
so you need the target
task to put those files somewhere at then end of the taks pipeline
the entireity of my knowledge is (doc target) and (doc sift) -- so I can't help you much beyond this, but based on what you've described and I've tried, I do think sift/target are what you need
yup seems so
thanks !
yay that works
I don’t have to use sift
I just generate the files on the tmp dir and then the target task persist the tmp into my directory of choice
@clodeindustrie alternatively, for creating files in your project directory, you can also just spit
them to resources/migrations/abc.sql
or similar
@clodeindustrie that would imply not making use of the fileset. For many situations you want to use the fileset but if you want something added to your project directory and subsequent tasks don’t depend on it being in the fileset it’s fine to skip the fileset entirely too
anybody knows what’s the difference between adding resources to the fileset with adding them to the env via merge-env! :resource-paths
and with-pre-wrap
/`add-resource`?
in both cases they are in the fileset according to boot.task-helpers/print-fileset
, but when I commit!
the fileset, only resources with added with add-resource
are written to the tmp dir
@kommen re: https://github.com/crisptrutski/boot-cljs-test/issues/55 — is clj
really a top level directory in your project?
the clojurescript project lives inside an elixir/phoenix app and we wanted it clearly separated
ah, just read up the full issue, seems like you found a solution
weird though that merge-env! resource-paths doesn’t work
Any way to switch back to plain ol' stacktraces in boot? Seeing something I suspect is cut off.
@micha yeah, that's what I was looking for, ta. Was just a particularly confusing exception. It was actually everything I needed after all!
@dominicm there's a way to turn them off in yuor build.boot or profile.boot
(alter-var-root
#'boot.from.io.aviso.exception/write-exception
(constantly
(fn
([exception]
(.printStackTrace exception *out*))
([writer exception]
(.printStackTrace exception writer))
([writer exception options]
(.printStackTrace exception writer)))))
(maybe thats whats in wiki already?)
@alandipert This was really just for a one-off. I don't mind generally. I figured there'd be a quick override.
anyone on mac figured out a way to deal with 2015-07-09 16:46 java[29278] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
?
@alandipert Do you get that in a specific situation? Such as watching a large number of files?
@alandipert i managed to sort this when it was happening with boot-figwheel
, is that what you’re using?
@lorddoig na, using boot-cljs. but it doesn't seem to be related to tasks, jus the # of files and/or nested directories
Two things I’ve run across in forum threads while trying to debug that problem in the past: possible causes may include an outdated libuv
, and a supposed Apple-imposed limit (of 451 files).
I haven’t seen that error for a while now but I seem to recall ignoring node_modules
helped in some way.
cool. yeah googling turns up various GH issue threads across a smattering of build tools
@alandipert Our issue was compiling into a directory later set as a resource path and the target directory (weird I know). Boot was grabbing the fileset as soon as it started up before the target
task cleared it out.
false alarm. figured out that boot-reload does not work when optimizations are set to simple. has to be :none
This is somewhat off topic for this channel but I'm trying to update a cljsjs package with externs.
I can't figure out what I am supposed to put for the "JavaScript object you want to extern" when using http://jmmk.github.io/javascript-externs-generator/. I always get "Namespace '<the ns>' was not found. Make sure the library is loaded and the name is spelled correctly."
For example, I was trying to use it to generate externs for semantic-ui-react (located here https://unpkg.com/[email protected]/dist/umd/semantic-ui-react.min.js). I use js/semanticUIReact
in cljs to access React components so I assume semanticUIReact
would be the JS object I'd want to use. That gives me the aforementioned error. I've tried to use this tool in the past with a number of other JS libs but I have always gotten that error. Can someone who has used this tool before tell me what I am doing wrong? Maybe the tool simply isn't compatible with the format the library was written in?
It's not a big deal because I use goog.object/get
anyway so I don't need the extern. I was just trying to improve the package on cljsjs/packages 🙂
Yeah I have no idea what this tool is looking for 😕 Oh well, maybe someone else will figure it out 🙂
hmmm, is this a known issue that boot-garden + boot-reload do not work anymore when not using optimisations :none
?