Fork me on GitHub
#boot
<
2016-01-27
>
richiardiandrea04:01:59

a question is there any known problem in executing sifts one after another?

richiardiandrea04:01:27

Like (sift :add-meta) (sift :add-jar) ?

martinklepsch08:01:49

@richiardiandrea: haven't heard of any myself

dm309:01:20

has anyone done java annotation processing with boot?

jaen11:01:15

Quick question - are [str] and #{str} argument types equivalent? It seems that when I have #{str} in a task it accepts either of #{"something"} and ["something"].

sooheon11:01:08

@jaen, @gadfly361: Hey so far I’ve been calling semantic-UI through cdn like this:

[:link {:rel "stylesheet" :href ""}]
     [:script {:src ""}]
     [:script {:src "}]
Do you guys have any experience with the recommended way of building it with gulp? I’m not sure how to place it in my boot project and where to include it.

martinklepsch12:01:46

@jaen: with opt = [str] -> boot task --opt "x" --opt "x" -> opt = ["x" "x"] with a set it'd be #{"x"}

martinklepsch12:01:26

at least thats what I'd expect. I believe you can pass both because they're coerced in a way

martinklepsch12:01:43

(all guessing / not tested)

jaen12:01:00

@martinklepsch: I'm saying wrt. build.boot, not command-line options, I figured that maybe coercions like that happens before options to a task are passed so #{str} will expect #{"something"}, but it also makes sense for the task to coerce vector to a set when called. And at least it seems to be the case, as I can call a #{str} options with both ["something"] and #{"something"}, so our guess is probably correct, but wanted to know if it's meant to work like that, or a bug.

jaen12:01:30

@sooheon: do you need their theming mechanism?

sooheon12:01:55

Yep that’s what I’m trying to use.

jaen12:01:03

Ah, then I'm not sure if I can help you - I use semantic-ui's SASS port through boot-middleman.

sooheon12:01:36

so in that case, there is no way to do things like set the semantic global primary colors and such?

jaen12:01:30

But you could probably make a directory for assets, use their build system to output CSS to a subdirector resources and then just have a boot task run gulp when things change in the assets directory.

jaen12:01:37

Yeah, it only uses the default theme

jaen12:01:33

Semantic-ui's theming method is incompatible with SASS, since it requires interpolation in imports and from what I read of the issue SASS doesn't want to do that

sooheon12:01:18

Do you mean “a subdirectory of resources”?

sooheon12:01:23

Something like this:

project/
├── build.boot
├── resources
│   └── output-of-semantic-gulp
└── semantic/$run-gulp-in-here
?

jaen12:01:54

Yeah, something like this - semantic would be where you would have your source files like your theme our custom less files and you would configure it to output to some directory in resources, for example resources/public/assets/stylesheets or something like that.

jaen12:01:23

Looking at - http://semantic-ui.com/introduction/build-tools.html#semanticjson - the directories seem to be configurable.

sooheon12:01:11

Ok thanks :)

micha15:01:45

@richiardiandrea: no problems known to me

plaxdan16:01:56

Has anyone seen the following error when attempting to start a cljs-repl from within a boot repl? Sequence of commands: > boot repl Now within the boot repl: > boot.user=> (start-repl) Results in this:

java.lang.IllegalStateException: Can't change/establish root binding of: *cljs-repl-env* with set

juhoteperi16:01:53

Hmm, boot-test is getting slower and slower for me in one project. When started it takes 10s to run tests but after about 20 runs it takes 25s. I though at first it was leaking pods but pods were garbage collected after some time.

dm318:01:27

I'm writing a boot criterium task - now thinking what would be the best API to provide in a task like (bench). Currently I have the following:

(deftask bench
  [g goal GOAL                sym      "qualified name of the goal function to run"
   a args KEY=VAL             edn      "map of arguments passed to the goal function"
   c criterium-opts KEY=VAL   edn      "options to the Criterium"
   P progress                 bool     "show progress report?"
   Q quick                    bool     "run a quick benchmark?"]
...)

dm318:01:59

so you can say (comp (bench :goal 'my/fn1) (bench :goal 'my/fn2) (report :stdout true))

dm318:01:32

but I'd rather allow providing arbitrary expressions from the repl/cmdline

dm318:01:51

and also supporting a case when you want to bench the same fn with different versions of dependencies

dm318:01:02

(means running functions in pods)

dm318:01:18

any thoughts?

richiardiandrea19:01:09

I am hacking sift and there is something I cannot figure out, basically when I call (sift --option) (sift --option) the first (fn [fileset] ...) is not executed

richiardiandrea19:01:21

I tried by putting println inside 😄

richiardiandrea19:01:45

I am in a deftask and I will try more and maybe have a little repro case

richiardiandrea19:01:25

if the are chained (sift --option1 ... --option2 ...) in the same sift no problem

raywillig19:01:35

@richiardiandrea: i'm no expert but I think that makes sense. the fileset is a value and if you haven't commit! ed after the first sift, the second sift is probably sifting the as yet unmodified fileset

raywillig19:01:43

just my $.02

richiardiandrea20:01:08

@raywillig: I was not thinking about that, but it makes total sense!

juhoteperi20:01:12

Sift task calls commit! before calling next task

raywillig20:01:10

oh, well never mind then 😛

richiardiandrea20:01:39

there is a problem then

dm320:01:06

@micha - if you have any spare time, would be great if you could advise on https://clojurians.slack.com/archives/boot/p1453920747000550 simple_smile

ion20:01:53

I'm trying https://github.com/adzerk-oss/boot-cljs/wiki/Example but main.js is not saved to ./target

ion20:01:00

I notice this: :output-dir "/Users/ion/.boot/cache/tmp/Users/ion/bootcljstest/48m/pj5f4p/main.out"

ion20:01:19

Which makes me wonder if the wiki page I'm following is out of date -- perhaps there is another necessary option

juhoteperi20:01:02

ion: if you have set BOOT_EMIT_TARGET=no you need to use target task

ion20:01:37

@juhoteperi: ok, yes, I have that environment setting, as recommended by boot "Implicit target dir is deprecated, please use the target task instead."

ion20:01:58

sounds like that is worth a mention in the wiki and tutorial

juhoteperi20:01:59

I updated the wiki page

ion20:01:32

Yes, boot cljs -s -- target works for me. The -- separates boot subcommands -- that's what I remember from a boot video, but I'm curious if that arises from boot directly or if it is a shell parsing thing

juhoteperi20:01:51

-- is not necessary, it can be used to make it easier to understand the command

juhoteperi20:01:42

Not sure if that is documented on Boot wiki. Should probably be.

richiardiandrea21:01:38

is there a way to access tmpfiles (the whole record) without passing by (with-pre-wrap [fs] ?

sooheon21:01:35

Hey guys, I’m recently getting this (non-fatal) error on my cljs builds,

java.util.concurrent.ExecutionException: java.nio.file.NoSuchFileException: target/js/main.out/cljs_deps.js
      java.nio.file.NoSuchFileException: target/js/main.out/cljs_deps.js
What is it that needs this file, and where’s the first place I should be looking to fix this error? Thanks

jaen21:01:21

Does this happen when you build or when you serve files?

sooheon21:01:52

I’m seeing it after every “Compiling clojurescript…” i.e. everytime I change a file

sooheon21:01:46

To be more accurate, it doesn’t happen when I first build, but as I’m iterating and interacting with the app a bit, I’ll look back and see that for the last n cljs-builds this error was there

chris-andrews22:01:14

Ever since warnings about BOOT_EMIT_TARGET=no started cropping up, I can’t get a cljs-repl to work. I am using the target task and I have a boot.properties file with a BOOT_EMIT_TARGET=no line in it, but I still get the warnings and I am getting a no such file exception whenever I try to start the cljs repl. Anyone know of anything obvious I may be missing that could explain this?

chris-andrews22:01:22

My normal flow is to start a boot cljs and cljs-repl task, and then boot repl -c to start the cljs repl. I just noticed that when I connect using the repl my target directory gets emptied

thosmos22:01:31

@sooheon: I'm getting as well

thosmos22:01:52

OS X here as well

thosmos22:01:17

this is what's happening for me when I change a CLJS file:

chris-andrews22:01:44

I was also having some problems when I would change a cljs file, but they seem to have gone away except when I try to connect the repl

chris-andrews22:01:10

If boot repl and then make a change and save the file, I think I get the same type of message

thosmos22:01:22

I have a client repl connected with boot repl -c

thosmos22:01:57

it's connecting to the nrepl started by (cljs-repl)

sooheon22:01:47

@thosmos: weird, the actual file its looking for is different though.

chris-andrews22:01:49

Ok, not sure where the 2.4.2 issue was coming from, but I got that working. So I only encounter these problems on 2.5.x

richiardiandrea23:01:07

@micha: we were talking long time ago about clojure test and the fact that you don't have boot core required...so how can I require it in a clojure.test basically? In a pod?

richiardiandrea23:01:14

My error is the classic:

Caused by: java.lang.IllegalArgumentException: No implementation of method: :-mk! of protocol: #'boot.tmpregistry/ITmpRegistry found for class: nil

richiardiandrea23:01:19

(I am trying to revive boot's tests, I can't live with the fear of breaking stuff :D)

richiardiandrea23:01:40

Another way to say this is, is there a way to initialize the boot core stuff so that I can put it in a fixture?

richiardiandrea23:01:28

About above above I guess you cannot do (sift --) (sift --) in a task but (comp (sift --) (sift --))

richiardiandrea23:01:26

I cannot call (core/init!) as I am missing the pod initialization...and worker pod, which are passed to -main...digging digging

micha23:01:26

@richiardiandrea: you can't really do that i don't think

micha23:01:58

because the stuff in boot.core represents jvm state

micha23:01:08

however what you can do is run boot in boot

micha23:01:36

that's how i was going to approach the tests

richiardiandrea23:01:27

@micha can you expand a bit on that?

richiardiandrea23:01:02

if was trying to create a pod with boot.core inside but it does not look it's going to work

richiardiandrea23:01:42

returns a weird java.lang.IllegalStateException: Pop without matching push

micha23:01:34

that error is caused by trying to eval in the same pod you're in

micha23:01:53

like if you are doing this

micha23:01:05

(with-eval-in pod ...)

micha23:01:08

and you get that error

micha23:01:10

you can do this

micha23:01:27

@(future (with-eval-in  pod ...))

micha23:01:29

the issue arises because with-eval-in swaps out the clojure thread local bindings stuff

micha23:01:48

so if you eval-in the pod you're alraedy in it gets confused

richiardiandrea23:01:45

understand, I will maybe push something at the end of (my) day and you can have a look, but now it looks like something is working