Fork me on GitHub
#boot
<
2016-04-11
>
richiardiandrea00:04:23

this is so great!!! we found it!

richiardiandrea00:04:36

I will open a PR and probably send a little nudge to #C06E3HYPR 😄

richiardiandrea00:04:50

mmm...the build is stuck?

richiardiandrea00:04:46

weird errors in the build...cannot retrieve org.clojure:clojure:pom:1.8.0 seems odd

richiardiandrea00:04:38

also, when it gets to make test everything should be installed in .m2 so maybe there is no need to retrieve boot.sh...

micha00:04:33

boot.sh isn't in .m2

micha00:04:58

i think it's stalled because the travis machines have only 2 threads

micha00:04:03

i mean 2 cores

richiardiandrea00:04:35

mmm...in my case 2 cores means 4 batches

richiardiandrea00:04:23

there are 10 tasks if i remember correctly, so it launches 4 threads, 4, 2

richiardiandrea00:04:30

in any case as you know you can put :threads 1 but it is a pity

micha01:04:21

does that get tests to work on Travis?

adamkowalski01:04:36

@micha: how does the boot repl -c launch so fast?

adamkowalski01:04:49

its like night and day difference from launching lein repl

adamkowalski01:04:02

even when you have two repls connected

micha01:04:56

it's only starting the repl client i guess

micha01:04:33

the repl server takes a little while to start up

adamkowalski01:04:53

yeah but you only have to do it once

richiardiandrea01:04:19

Travis is always a strange beast ... how can I test it?

micha01:04:50

@richiardiandrea: there is a link from the pull request

micha01:04:52

"details"

micha01:04:14

if you push a new commit to your PR it will run the tests again

micha01:04:03

the "cannot retreive clojure1.8.0" etc errors are not really errors

micha01:04:19

you can see it just couldn't find it in the clojars repo but it does find it in maven central

micha01:04:46

that's a new thing with 2.6.0 boot, maybe we should not print maven errors

micha01:04:00

it'll be confusing

richiardiandrea01:04:12

Yep but I think I cannot try unless I am allowed to ;)

tabrez09:04:42

Where does boot save all the dependency files? I need to cache that location for a docker container so they don't get downloaded on every run.

tabrez09:04:46

I saw ~/.boot/cache has four directories: bin, cache, lib tmp. Is this it?

martinklepsch09:04:51

@tabrez: ~/.m2 just like lein/mvn

tabrez09:04:57

@martinklepsch: cheers, thanks.

micha13:04:12

@tabrez: there is a boot image on dockerhub with an example of how to do that kind caching in its Dockerfile

micha13:04:25

if you need inspiration

tabrez13:04:36

@micha The one that caches web and repl task dependencies? That's the official/adzerk one I think and I have decided to use that method for now.

jfntn15:04:30

Hi folks, I’m trying to use the "runtime require/resolve inside a task" trick on a macro, but that doesn’t work and I’m now wondering if that’s possible at all?

jfntn15:04:02

To be more accurate the issue is that the args to the macro get evaluted

jfntn15:04:25

Which is expected, but I’m not sure how to handle cases where new bindings get introduced like say with the with-open macro

richiardiandrea15:04:24

@micha about the errors for not finding deps, I agree they should be at least warnings, they can be a lot

micha15:04:46

@richiardiandrea: it is finding them though

micha15:04:56

just not in that repo, in a different repository

richiardiandrea15:04:07

yes I noticed that locally too

micha15:04:19

so it prints both the failure and the success

micha15:04:25

seems like that will confuse everyone

richiardiandrea15:04:29

so, talking about Travis, I still don't know what is the problem

micha15:04:43

is it a memory issue?

micha15:04:48

they set it to 32M

micha15:04:58

maybe that's not enough?

micha15:04:15

it's weird that it just hangs though

richiardiandrea15:04:19

does it work locally for you?

micha15:04:23

seems like a deadlock situation somehow

micha15:04:31

yeah tests run locally no problem

richiardiandrea15:04:34

yeah I was thinking about that

richiardiandrea15:04:05

but what can be the difference...the Java version? those are just Futures and CountDownLatches

micha15:04:14

"never ever block forever" maybe we can add a timeout in there somewhere

richiardiandrea15:04:29

yeah it makes sense

richiardiandrea15:04:40

will work on that

richiardiandrea15:04:29

I will start by adding -vv, but a little bit later

richiardiandrea16:04:50

@martinklepsch: confetti works like a charm now simple_smile

richiardiandrea16:04:18

very nice tool congrats, all I needed was:

(deftask deploy-s3
  []
  (let [bucket (get (env/env) "AWS_BUCKET")]
    (boot.util/info "Deploying on bucket %s...\n" bucket)
    (sync-bucket #_:dry-run #_true
                 :bucket bucket
                 :access-key (get (env/env) "AWS_ACCESS_KEY")
                 :secret-key (get (env/env) "AWS_SECRET_KEY"))))

martinklepsch16:04:31

@richiardiandrea: great to hear. If you're using Cloudfront it can also create invalidations for you simple_smile

richiardiandrea16:04:08

still need to wrap my head around that 😄

dominicm17:04:06

@micha: boot isn't working offline, because its looking for github. Developers on trains everywhere are sad.

martinklepsch17:04:11

@dominicm: that must be a 2.6.0 thing, have been using 2.5.* on trains a lot 😛

dominicm17:04:46

Micha mentioned it the other day to do with release version checking.

dominicm17:04:02

Its trying to download 2.5.5

dominicm17:04:53

Yeah, this is weird. Can't even get to the version, it's like boot isn't detecting offline mode

lwhorton17:04:27

Hey has anyone been able to get foreign-libs to work? I dont know what I’m doing wrong, but no matter what I get no such namespace errors...

lwhorton17:04:50

1) in build.boot declare :compiler-options {:foreign-libs [entry] where an entry looks like {:file “main/index.js” :provides [“theThing”] :module-type :commonjs } 2) place /main/index.js underneather src/js/ 3) index.js looks like a simple module.exports = function theThing(args) { console.log(arg) } 4) from another cljs module (ns main.core (:require [theThing: as thing])

martinklepsch17:04:29

@lwhorton: foreign libs can't be required with :as

lwhorton17:04:48

Am I putting the javascript src files in the wrong place? Am I doing something wrong with foreign-libs? I haven’t done any externs.js file yet, but I’m not trying :advanced at the moment.

martinklepsch17:04:05

(:require [theThing]) and then js/theThing that said I'm not sure to what extend common js stuff is supported

lwhorton17:04:49

Hmm, that commonjs could be it I suppose. I really don’t want to have to touch the original js modules (which are all commonjs) if I can help it.

lwhorton17:04:10

If I strip out :module-type and change main/index.js to just be a simple function theThing(arg) {} (no commonjs) it still barfs with namespace warnings, though.

lwhorton17:04:39

Where should I nest the javascript source files, resource-paths or source-paths, or somewhere else?

martinklepsch17:04:42

@lwhorton: the path you provide under files needs to be relative to one of the paths you provided as source/resource-paths

martinklepsch17:04:17

if src is in :source-paths in your project you should try js/main/index.js

lwhorton17:04:45

Yea, pretty sure i have it right then:

:source-paths #{"src/cljs" "src/js"}
 :resource-paths #{"resources"}
with the cljs code in src/cljs/main/core.cljs that is doing the requiring of [theThing] where the js is src/js/main/index.js

lwhorton17:04:51

not quite sure where else to go, I threw up an issue on the gh but I don’t see any other posts online where people are trying this explicitly with boot (usually just raw closure compiler)

martinklepsch17:04:40

@lwhorton: this isn't boot specific so I guess #C03S1L9DN might also be helpful

martinklepsch17:04:01

boot doesn't do any special handling with :foreign-libs

lwhorton17:04:08

i have no idea what magic boot does under the covers, so I wasn’t sure where the root of the problem might be

lwhorton17:04:17

that’s good to know, thanks for your help @martinklepsch

cork17:04:01

When I create a jar file with Boot I do not get an output in the target dir. I have to hunt it down in the /.boot/cache/tmp/ dir. Is this just a Windows file system issue? Idk why I continue to use Windows with all the trouble that comes with developing in it...

cork17:04:28

I can compile with leiningen and see the output in the correct dir

alandipert17:04:03

@cork maybe try the target task at the end of your pipeline?

alandipert17:04:41

for years boot emitted a target dir by default, but recently we deprecated and now complain about it. so the sure-fire way to get it to emit is by adding target to your pipeline

adamkowalski17:04:28

i think you need to specify the output directory too right? like: (target :dir #{"target/"})

cork17:04:09

Awesome that worked! thanks

lwhorton17:04:26

I have a boot.properties file with the line BOOT_EMIT_TARGET=no, but then also have the ^ mentioned :dir “target”, but I don’t use windows

adamkowalski17:04:53

have you guys been able to get cider autocompletion to work in clojurescript mode with boot? when I use cider-connect and try to connect to the nrepl remotely i can only get clojure but not clojurescript completion

martinklepsch20:04:45

@micha: what's the convention behind the plusses in +last-commit+?

micha20:04:54

constants

micha20:04:10

kind of dumb i guess lol

cork21:04:14

How could I exclude my main.out dir from my jar file during build? My build pipeline runs advanced compiler mode on cljs code at the start, but I shouldn't need main.out in production right?

micha21:04:47

@cork you can use the sift task to do that

micha21:04:57

after cljs and before jar

micha21:04:36

if you are doing a compile with optimizations you don't necessarily need the output dir

micha21:04:44

however without it source maps won't work

micha21:04:58

and you might want source maps for advanced optimizations

cork21:04:09

ah i see

cork21:04:17

Thanks for help!

raynes21:04:04

Have apparently not used slack long enough (two weeks) to remember search shortcuts.

richiardiandrea21:04:03

@micha you were right about memory:

The main thread is going to wait for 2 task(s) to complete...
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	at boot.App.runBoot(App.java:405)
	at boot.parallel$fn__1107$fn__1108$fn__1115$fn__1116$fn__1117.invoke(parallel.clj:71)
	at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938)

richiardiandrea21:04:20

I will try to increase it a bit

richiardiandrea21:04:10

ah no cannot do it myself

micha21:04:42

@richiardiandrea: is there a permissions problem?

micha21:04:53

do i need to do something in travis?

richiardiandrea21:04:11

probably the memory is too low yes

richiardiandrea21:04:23

but I am not sure how to increase that

micha21:04:50

i'd just as soon get rid of travis i guess

micha21:04:29

we all know how to run tests, we can do it manually

richiardiandrea21:04:04

ah ah ok, but it is great for PRs and regressions 😄

micha21:04:12

yeah that's true

micha21:04:49

have you tried setting -Xmx2g in the BOOT_JVM_OPTIONS?

micha21:04:57

in the Makefile?

richiardiandrea21:04:05

no I was going to try that

micha21:04:27

i think the test runner machines do have a few G of memory

micha21:04:11

ah permgen, too

micha21:04:21

java 8 is the answer there

micha21:04:46

i see it's using 1.7.0_80

richiardiandrea21:04:58

apparently there was some still that was kind of half ported when I split boot test in boot parallel but that was not the issue

richiardiandrea21:04:34

I will add:

language: java
jdk:
  - oraclejdk8

richiardiandrea22:04:51

i also added a timeout of 30 mins for parallel tasks

micha22:04:42

i would think probably one or two minutes would be enough, no?

richiardiandrea22:04:28

well it is a ^dynamic var so everybody can set it up

richiardiandrea22:04:36

I felt generous 😄

richiardiandrea22:04:30

I did not even have to bump the memory

richiardiandrea22:04:33

@micha ready to merge, does Travis also pushes a SNAPSHOT? I have a project depending on the latest sift fix and I wanted to ask if you can push a SNAPSHOT to Clojars when you have time

micha22:04:43

can push it

richiardiandrea22:04:53

thanks it would be awesome

micha22:04:03

i'm a bit worried to have deploy keys on any machine on the internet

micha22:04:17

so i prefer to push to clojars etc myself

richiardiandrea22:04:08

oh well that's understandable yes

domkm23:04:00

Does anyone know of a Boot task for cljfmt (https://github.com/weavejester/cljfmt)?