Fork me on GitHub
#boot
<
2016-10-09
>
micha00:10:37

@arohner can you paste your build.boot file please?

micha00:10:57

also is some other process deleting/moving files around in the target directory?

yury.solovyov09:10:35

what's the best way to consume npm module with boot?

borkdude11:10:40

I added an example of how to distribute a boot bundle via clojars. Might have to work on some documentation in the example though. https://github.com/borkdude/boot-bundle/blob/master/README.md#how-can-i-distribute-my-bundle-via-clojars

juhoteperi18:10:48

Latest boot-less snapshot should show warnings and errors on boot-reload HUD

arohner18:10:29

@micha here’s my build.boot:

arohner18:10:29

some other weird behavior I’m seeing, that might be related: when I start boot, I see tons of:

2016-10-09 13:37 java[57185] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-10-09 13:37 java[57185] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-10-09 13:37 java[57185] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-10-09 13:37 java[57185] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)

micha18:10:50

@arohner i see the issue

micha18:10:02

your target dir overlaps :resource-paths

richiardiandrea18:10:56

@juhoteperi super cool! boot-sass as well?

micha18:10:59

the target dir is just for dumping the final state of boot before it exits

juhoteperi18:10:18

@richiardiandrea Not yet, jsass doesn't support proper warning handlers yet

juhoteperi18:10:55

I can define a warning handler, but it will only get the message, no file path or line number

richiardiandrea18:10:59

as usual, if there is anything I can do...I am using it and I can have a look

micha18:10:03

@arohner you have a feedback loop there, all kinds of weird stuff will happen

arohner18:10:29

@micha got it, thanks. So what is the ‘best’ practice for serving my compiled CLJS?

micha18:10:41

@arohner serve it from the classpath

richiardiandrea18:10:46

@juhoteperi we could use some trick they used in dirac and re-frame maybe

micha18:10:49

and don't use the target task for that

richiardiandrea18:10:01

and show it in the message...better than nothing

micha18:10:27

@arohner use eg. wrap-resource

arohner18:10:56

right, so it has to get on the classpath first. Should I adjust (target :dir)? use sift? something else?

micha18:10:06

it's already on the classpath

micha18:10:08

so that's fine

micha18:10:22

the target dir doesn't affect the classpath at all

arohner18:10:30

how is it already on the classpath?

micha18:10:36

it just copies files from the fileset to a directory

arohner18:10:48

it gets output to target/ by default? which isn’t on the classpath?

micha18:10:54

it's on the classpath because it is added by the boot-cljs task with add-resource

micha18:10:05

right, the target dir shouldn't be on the classpath

micha18:10:32

the target dir is only useful for creating an artifact that you will want after boot exits

micha18:10:52

the target dir is in an undefined state while boot is running

micha18:10:14

like for example suppose you are creating an uberjar that you want to run locally

richiardiandrea18:10:28

@juhoteperi it looks like we need to patch jsass then lol

micha18:10:29

you might have it write to the target dir then, so you can access the jar after boot exits

micha18:10:42

it's not really in an undefined state while boot is running, but it's write-only basically

micha18:10:25

the target task does something similar to rsync --delete to sync the fileset with the target dir

juhoteperi18:10:24

@richiardiandrea It's not that simple. We would also need to add C calls to populate those properties etc. and I'm not even completely sure if SassWarning affects the warning handler function.

juhoteperi18:10:11

As side note, jsass handler functions need to use Java Annotations, so defining them from Clojure is some work: https://github.com/Deraen/sass4clj/blob/warning-handler/src/sass4clj/impl/warning_handler.clj

richiardiandrea18:10:37

yeah true, I have never worked with that stuff, can be fun 😄

richiardiandrea18:10:53

ok fun in the sense that I might learn something new 😄

juhoteperi18:10:45

I have issue open on Jsass and I think it's best to wait for them to anwer that

juhoteperi18:10:57

And I'll probably release new less/sass4clj and boot-reload in few days, even if I can't add warning support to sass4clj yet

juhoteperi18:10:05

Especially sass4clj should have lots of fixes

richiardiandrea19:10:10

to be honest I've been tempted many times about adding figwheel in our project along with boot...so far boot-reload has resisted so what you are saying is really good news

Tim20:10:29

how would I specify with boot to have static public files in a resources dir, similar to lean?

Tim20:10:45

ah, I think I figured it out

Tim20:10:04

just added resources to my resource-paths: :resource-paths #{"src" "resources"}

mynomoto23:10:19

I'm getting adzerk.boot_cljs.util.proxy$java.lang.Throwable$ff19274a: Don't know how to create ISeq from: clojure.lang.Keyword on cljc files from boot-cljs. Has someelse seem that?

richiardiandrea23:10:18

@mynomoto can you paste adapter_test, probably something in there

mynomoto23:10:39

@richiardiandrea I got over that by renaming the test files to .clj, I will try to investigate that later, thanks!