Fork me on GitHub
#boot
<
2017-03-13
>
qqq01:03:53

My server has ip a.b.c.d; it's running boot-cljs and boot-reload

qqq01:03:24

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> ?

qqq01:03:52

ah, n/m got it owrking

qqq01:03:02

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

qqq01:03:06

I don't know how to debug this.

michael.heuberger02:03:31

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.

richiardiandrea04:03:51

@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.

qqq04:03:54

I have something like

(watch)
(garden :styles-var 'app.css/base)
...
and it works fine for me

michael.heuberger04:03:50

@richiardiandrea what do you mean with “inside a watch”?

michael.heuberger04:03:57

can there be multiple “watch”?

qqq04:03:56

(comp
  (watch)
  ... stuff here ocnsidred to be 'inside a watch'

richiardiandrea04:03:02

watch should come before reload (but it should be already like this). No only one watch is allowed I think

clodeindustrie05:03:59

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.

clodeindustrie05:03:03

(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))))))

clodeindustrie05:03:13

is there anything that looks weird?

qqq05:03:40

@clodeindustrie : what is (1) the expected behaviour and (2) the actual behaviour ?

clodeindustrie05:03:09

(1) I want the files created from the createNewFile in my resource directory in my project

clodeindustrie05:03:58

(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!

clodeindustrie05:03:09

which is what I was expecting that function to do

qqq05:03:19

@clodeindustrie : I think the tasks you need to use are "sift" and "target"

qqq05:03:26

but I don't know how in particular you need to use them.

clodeindustrie05:03:45

right I think I’m missing the target task

clodeindustrie05:03:22

looks like the commit! only persists what is in the fileset and not in the physical temp directory

clodeindustrie05:03:50

so you need the target task to put those files somewhere at then end of the taks pipeline

qqq05:03:45

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

qqq05:03:58

iirc, stuff may be only put in 'tmp' until target is called

qqq05:03:04

and iirc, 'sift' is really 'mv'

clodeindustrie05:03:27

I don’t have to use sift

clodeindustrie05:03:55

I just generate the files on the tmp dir and then the target task persist the tmp into my directory of choice

martinklepsch08:03:24

@clodeindustrie alternatively, for creating files in your project directory, you can also just spit them to resources/migrations/abc.sql or similar

martinklepsch08:03:51

@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

kommen09:03:03

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`?

kommen09:03:21

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

martinklepsch09:03:08

@kommen re: https://github.com/crisptrutski/boot-cljs-test/issues/55 — is clj really a top level directory in your project?

kommen09:03:20

the clojurescript project lives inside an elixir/phoenix app and we wanted it clearly separated

martinklepsch09:03:21

ah, just read up the full issue, seems like you found a solution

martinklepsch09:03:51

weird though that merge-env! resource-paths doesn’t work

kommen09:03:52

yep, found something which works, though I’d like to understand why it works 😉

dominicm12:03:43

Any way to switch back to plain ol' stacktraces in boot? Seeing something I suspect is cut off.

micha14:03:20

@dominicm does boot -vv ... give you the stack traces you like?

micha14:03:38

there is info in the wiki about how to disable the fancy stacktraces

dominicm14:03:08

@micha yeah, that's what I was looking for, ta. Was just a particularly confusing exception. It was actually everything I needed after all!

dominicm14:03:19

NPEs are a real pain at times.

micha14:03:32

yeah i do not enjoy them

alandipert15:03:34

@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)))))  

alandipert15:03:39

via @hiredman

alandipert15:03:06

(maybe thats whats in wiki already?)

dominicm15:03:25

@alandipert This was really just for a one-off. I don't mind generally. I figured there'd be a quick override.

alandipert17:03:38

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)?

seancorfield17:03:10

@alandipert Do you get that in a specific situation? Such as watching a large number of files?

lorddoig17:03:16

@alandipert i managed to sort this when it was happening with boot-figwheel, is that what you’re using?

alandipert17:03:18

@lorddoig na, using boot-cljs. but it doesn't seem to be related to tasks, jus the # of files and/or nested directories

seancorfield17:03:12

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).

seancorfield17:03:51

I haven’t seen that error for a while now but I seem to recall ignoring node_modules helped in some way.

alandipert17:03:17

cool. yeah googling turns up various GH issue threads across a smattering of build tools

lorddoig17:03:19

@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.

lorddoig17:03:26

And so registering watchers on all the cache files from the previous run.

michael.heuberger21:03:46

false alarm. figured out that boot-reload does not work when optimizations are set to simple. has to be :none

kenny22:03:13

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/seman[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?

micha22:03:02

@kenny did you try just semanticUIReact?

micha22:03:53

i just did the jquery example

micha22:03:05

it wanted jQuery there

micha22:03:48

if i type jquery i get the error you mentioned

micha22:03:58

maybe you misspelled the name of the object?

kenny22:03:29

semanticUIReact is what I use in cljs and it works under :advanced compilation though

kenny22:03:27

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 🙂

kenny22:03:50

... without requiring a lot of my time 😉

micha22:03:53

i think the name you use is the name you'd have in regular js land

micha22:03:29

one more thing you could try htough is cljsjs.semanticUIReact

kenny22:03:22

nope 😕

kenny22:03:10

Yeah I have no idea what this tool is looking for 😕 Oh well, maybe someone else will figure it out 🙂

michael.heuberger23:03:38

hmmm, is this a known issue that boot-garden + boot-reload do not work anymore when not using optimisations :none?