Fork me on GitHub
#boot
<
2016-02-02
>
seancorfield00:02:57

Sorry, was out rescuing my wife. Car troubles.

tolitius02:02:15

might be missing something obvious.. if I want to send -D param to a task / boot repl, is this the only way: https://github.com/boot-clj/boot/wiki/JVM-Options#per-project-settings ?

pesterhazy02:02:32

@tolitius: probably; I guess that's the downside of having a single jvm

micha02:02:08

(System/setProperty "foo" "bar")

tolitius02:02:40

ah.. duh simple_smile was trying to bend set-env! to do it

tolitius02:02:46

thanks Micha!

tolitius02:02:52

tend to forget I am (`build.boot`) completely in Clojure

tolitius02:02:38

might be worth adding to https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users e.g. to point out that something like:

:profiles {:dev {:jvm-opts ["-Dparam=value" "-Xmx4g"]}}
can be just done with (System/setProperty "foo" "bar") and per task if needed

tolitius02:02:00

@micha, I can PR a note about it, if that's ok?

micha02:02:09

sure that sounds great

micha02:02:21

some JVM properties are magical though

tolitius02:02:43

magical for pods you mean?

micha02:02:50

i mean in the JVM

tolitius02:02:52

since they are global per JVM

micha02:02:05

some system properties are only read when the JVM starts

micha02:02:24

and changing them later doesn't have the intended effect

tolitius02:02:24

right, so you can't customize them by pods (is what I meant)

micha02:02:45

so some properties do need to be set via BOOT_JVM_OPTIONS

tolitius03:02:08

makes sense, ok, I am not going to mention JVM args per say, will just give a -D example, as it is most useful (I think)

pesterhazy03:02:33

oops, didn't know that you could set properties after startup

thomas13:02:41

Hi, I just started using boot a few hours ago and making lots of progress so far with my cljs project. (tenzing template)… but now I do need a compojure server… is there anywhere an example where I can have a look at see how it is done?

martinklepsch13:02:11

@thomas: there is boot-system which might be interesting if you're a fan of component

thomas13:02:30

ok let me have a look

martinklepsch13:02:37

other than that also deraen's saapas example project uses compojure

thomas13:02:59

aah ok, that might be better… I don’t thinkI need component

micha13:02:33

good morning @martinklepsch, welcome @thomas

pesterhazy13:02:06

@thomas, you can also just run random code from boot, like starting a http-kit server

pesterhazy13:02:19

you don't actually need a pre-built task for that

pandeiro15:02:31

guys i'm pretty convinced there is some real issue with boot 2.5.x wrt how it retrieves dependencies

pandeiro15:02:17

i was talking about it 2 weeks ago here -- basically when I run boot through docker, it hangs when downloading deps that aren't in the cache

micha15:02:41

did you use the -v boot option to watch what it's doing?

micha15:02:54

it will print tons of stuff while it fetches deps

pandeiro15:02:58

I can, you mean so we see all the aether stuff?

micha15:02:02

so you can see what's holding it up

pandeiro15:02:13

yeah I think we realized that it wouldn't work b/c this is happening prior to when -v kicks in

pandeiro15:02:21

I can of course try again

micha15:02:35

you're saying it doesn't happen if you load deps in your build.boot?

pandeiro15:02:58

no, no I'm loading them through build.boot

micha15:02:00

-v kicks in before anything in build.boot is evaluated

pandeiro15:02:05

or profile.boot as the case may be

micha15:02:10

yeah that's fine

micha15:02:17

-v is fully in effect

pandeiro15:02:29

so let me add the -v flag and run it inside and outside docker and see what's different

pandeiro15:02:33

i'll report back

pandeiro16:02:44

the output when it hangs with docker is here: http://sprunge.us/AEDC

pandeiro16:02:52

I just put the aether part

yenda16:02:04

is there a chance that https://github.com/seancorfield/boot-new task will join the boot core in the future ?

yenda16:02:18

that would be awesome, lein new is the only use of lein I have today

micha16:02:48

sure, i think if @seancorfield agrees sure

micha16:02:06

i think we want to explore for a while too

micha16:02:18

there are a lot of interesting possibilities in that area

yenda16:02:42

what kind of other possibilities ?

micha16:02:54

various ways to form composable tempaltes

pandeiro16:02:20

git clone is a pretty nice 90% solution

pandeiro16:02:53

it's so much nicer to work on something runnable rather than a template that needs to be compiled and then run to be debugged

yenda16:02:51

it is true that atm I am git cloning my projects and doing a replace of the old name for a new one globaly 😄

micha16:02:15

the benefit of the template thing is that it updates dependencies automatically

pandeiro16:02:23

@yenda: I have been doing that and I don't miss lein new, and I really don't miss maintaining templates simple_smile

micha16:02:36

so we don't need to keep pushing new commits to the template repo whenever anything updates

pandeiro16:02:39

@micha: how does it do that? it queries versions?

micha16:02:52

well like the hoplon template does that

micha16:02:05

obviously it depends on how the template task is constructed

micha16:02:45

but it saves us a lot of work updating templates

micha16:02:53

which would just fall by the wayside otherwise

pandeiro16:02:56

and when they break with some update?

pandeiro16:02:01

is it easy to debug that?

micha16:02:17

sometimes yes, sometimes no

micha16:02:21

it's a tradeoff

pandeiro16:02:25

yeah, probably not happening that often

micha16:02:53

there are docs, templates, code, so many things

micha16:02:04

stuff needs to be automated or it will just go unmaintained

pandeiro16:02:42

yeah i am a believer, just sometimes the cost of the automation hides itself in a couple of breezy first runs...

pandeiro16:02:42

it seems like this aether process just hangs inexplicably 😕

pandeiro16:02:07

like, the :success stage just never comes after it has downloaded almost all of the jar file

pandeiro16:02:54

what i have observed is that this never happened with boot <=2.3.x inside/outside docker

pandeiro16:02:30

but it does with 2.5.x, but only inside docker, which is mounting .m2/repository from the host

micha16:02:54

could be a docker change

pandeiro16:02:20

yeah i could try reproducing this while pegging the versions of docker

micha16:02:22

if you use boot 2.3.x in the same docker container you don't see the problem?

pandeiro16:02:39

actually wait, no, i don't have boot 2.3.0 there

micha16:02:50

you can use a boot.properties file or env var

pandeiro16:02:00

perfect, i'll try that

micha16:02:00

the binary will work with any stable boot release

pandeiro16:02:12

but could it not be an issue with the binary itself? possibly?

micha16:02:25

i don't see how it could be

pandeiro16:02:27

i'll try that, let me update boot.properties and run again

micha16:02:34

the binary doesn't do aynthing related to maven

micha16:02:59

all it does is download boot.jar, which does the maven stuff

micha16:02:08

and you get a boot.jar for each version of boot

pandeiro16:02:56

2.3.0 worked

pandeiro16:02:00

in the same docker container

pandeiro16:02:07

yeah... i've held off on an issue since there's a lot of moving parts, namely docker

pandeiro16:02:20

but i think working with 2.3.0 makes it clearer maybe?

pandeiro16:02:35

should i try with an intermediate version like 2.4.2 as well?

pandeiro16:02:55

was there an aether version bump somewhere?

micha16:02:00

2.6.0-SNAPSHOT is probably a better thing to try

micha16:02:07

maybe it's magically fixed

pandeiro16:02:15

i believe in magic

micha16:02:24

it's undeniable

pandeiro16:02:30

yeah and i don't really have a choice

micha16:02:31

how do computer work?

micha16:02:37

magic, obviously

pandeiro16:02:00

:sad_unicorn:

pandeiro16:02:09

no magic fix in 2.6.0-SNAPSHOT

pandeiro16:02:18

it stalls getting pod

micha16:02:33

very weird situation

micha16:02:42

which java are you using in your image?

micha16:02:27

it smells like a URL-related timeout is being reached

pandeiro16:02:59

using oracle java 2u55 -- one of the latest

micha16:02:43

there must be something about this on stack overflow somewhere

laforge4916:02:19

@micha does the new issue I just submitted --boot-reload #60--look to you like a file separator issue again?

pandeiro16:02:04

@micha thanks for looking at it; it's an annoyance but not a showstopper... I'll hold off on an issue for now...

laforge4916:02:40

--I'm getting an access denied exception

micha16:02:43

@pandeiro: filing an issue would be good, maybe someone has seen this before

pandeiro16:02:55

@micha: Ah ok, I will do it then

micha16:02:56

@laforge49: ok that looks like a boot issue now

laforge4916:02:07

file: "target\\main.out\\servant_demo\\core.js"

laforge4916:02:26

ran with 255 to be sure

laforge4916:02:35

with mapped files off

micha16:02:09

ugh windows

micha16:02:46

i am starting to lose hope for windows support

laforge4916:02:17

please don't say that!

micha16:02:30

windows users need to help fix these things

pandeiro16:02:52

that's a shitty catch 22

pandeiro16:02:59

maybe the solution is better marketing

pandeiro16:02:17

...i.e., so windows users use boot more and thus there is more debugging power

micha16:02:38

i just don't know anything about windows development

micha16:02:50

or what the platform limitations are

micha16:02:17

maybe windows doesn't support what boot needs to do

laforge4916:02:17

retested with 260-SNAPSHOT and now it is working.

pandeiro16:02:29

node went for years iirc w/o working properly on windows

laforge4916:02:33

--I must have used the right incantation this time!

pandeiro16:02:36

until MS stepped in

laforge4916:02:56

Very happy now!

laforge4916:02:11

2.6.0 is doing it for me.

micha16:02:21

excellent, whew!

micha16:02:32

you can do this with boot as well

micha16:02:51

the main idea there is doing boot ... in a layer before you build your app

laforge4916:02:56

Hmm. It may be that first issue can now be closed with 2.6.0-SNAPSHOT.

micha16:02:58

so it downloads maven deps

micha16:02:16

you would want to set BOOT_LOCAL_REPO in your dockerfile to something

micha16:02:56

RUN mkdir /m2
ENV BOOT_LOCAL_REPO /m2
RUN boot ...

ADD . /app
RUN boot ...

micha16:02:00

something like that

micha16:02:09

that will minimize maven downloading the world

pandeiro16:02:34

cheers @micha -- I already have that very well optimized -- it never downloads anything twice

pandeiro16:02:48

but I use the docker volumes mechanism

pandeiro16:02:56

to cache them on the host and share with the container

micha16:02:02

i wonder if that has something to do with it?

micha16:02:13

maybe some issue with java and volumes

pandeiro16:02:14

that is a very funky part of docker...

micha16:02:18

when the classloader is loading

pandeiro16:02:31

but the thing is, it Just Worked for >1 year already

micha16:02:31

you're on OSX right?

pandeiro16:02:39

with OS X it does not work

pandeiro16:02:54

that is a hopeless, windowesque nightmare that I try to take drugs to forget

micha16:02:56

ok yeah cause volumes are crazy in OSX

pandeiro16:02:58

but with linux, it works

pandeiro17:02:07

it, ahem, used to work

micha17:02:20

it's an enigma

pandeiro17:02:41

it's a minor annoyance for now -- it is not even 100% reproducible

pandeiro17:02:48

sometimes, the dependencies will finish

pandeiro17:02:50

even in docker

micha17:02:59

if you can test without mapped volumes that might provide some insight

pandeiro17:02:13

ok sure, I can just disable the mount

pandeiro17:02:19

and it will start downloading the world etc

micha17:02:40

if it goes faster without volumes then we've made progress

micha17:02:52

maybe something can be googled then lol

pandeiro17:02:54

yep, good call, testing that now

pandeiro17:02:02

yeah or the issue can be made more specific at least

yenda17:02:32

I see that you are talking about docker, if you need specific infos about the internals "I know a guy" 😄

micha17:02:40

haah that's rgeat because we need a guy!

laforge4917:02:06

Looks like boot snapshot has a small problem.

laforge4917:02:40

in aademo/lens I reference resource but there is none. normally nothing happens but now I get this:

laforge4917:02:46

so there may be some backward compatibility issues

micha17:02:14

how do you reference it?

laforge4917:02:08

When you upgrade to 2.6.0-snapshot, you need to delete the bogus resource-paths in the build.boot.

micha17:02:38

i didn't see any boot code in the stack trace

laforge4917:02:06

I will revert and retest.

laforge4917:02:45

but having such fun today closing all these windows issues because of 2.6.0-SNAPSHOT!!!

laforge4917:02:26

Here's the full trace:

laforge4917:02:37

and reverting back to boot 2.5.5 fixes it.

laforge4917:02:24

With reload now working with boot 2.6.6-SNAPSHOT, the only issue I am left with on windows is unit testing with phantomJS!!!

micha17:02:24

does phantomjs work on windows?

laforge4917:02:26

Of course, I now have to turn off jetty mapped files, but that is no biggie.

laforge4917:02:16

I should probably retest this with the new boot as well. 😄

juhoteperi17:02:17

Hmh, what is jetty mapped files?

pandeiro17:02:19

@micha As I'm playing around with it, I think volumes are essential to our docker-based workflow, especially to getting e.g. a live-reloading frontend env, where the UI updates when source code changes

juhoteperi17:02:59

"Jetty uses memory-mapped files to buffer static content,"?

pandeiro17:02:59

(I'm remembering why I never pursued COPYing source into specific docker images for our app in dev -- that is a huge limitation)

laforge4917:02:18

jetty uses mapped io by default. On windows, a file can not be deleted if in use. So the default causes a problem. This was fixed earlier we believe, but has come up again in the new boot snapshot.

seancorfield17:02:50

Yeah, totally, I just wasn’t sure boot-new was ready to be offered up yet… didn’t want to "presume"… https://clojurians.slack.com/archives/boot/p1454429448001656

seancorfield17:02:21

(and "morning!")

laforge4917:02:23

so here's the fix for jetty, thanks as usual to micha: (serve :port 8000 :init-params {"org.eclipse.jetty.servlet.Default.useFileMappedBuffer" "false"})

juhoteperi17:02:40

Looks like the even Jetty docs mentions that memory-mapped files don't work on Windows

juhoteperi17:02:24

Not sure if that's something that Boot can go around?

micha17:02:03

boot depends on being able to manage files in the fileset

micha17:02:12

which means deleting things when necessary

micha17:02:42

without that most things in boot wouldn't be possible

micha17:02:23

if some process is locking a file and the file changes, i'm not sure what could be done there

micha17:02:41

the operating system prevents another process from touching it to change it

micha17:02:23

actually it is strange that jetty has this problem when its running in the same jvm

micha17:02:44

i guess it's not only processes, but any open streams

micha17:02:17

maybe there is some hack that can be applied to windows

micha17:02:22

to disable that bullshit

micha17:02:05

or maybe a computed docker image is the solution

micha17:02:14

to all the windows problems

micha17:02:16

in windows if i open some system file in notepad does that mean the system can't write to it?

micha17:02:22

that seems like a huge security hole

micha17:02:51

like if i open the equivalent of /etc/passwd in notepad, nobody can change their password?

micha17:02:16

there must be some backdoor that can be done

micha17:02:24

i suppose windows will just kill notepad and then write to the file

laforge4917:02:31

notepad does not keep the file open except when reading or writing.

laforge4917:02:36

and to my knowledge, there are no backdoors to killing processes that keep files open. In extreme cases, when I can't figure it out, I log off or even reboot.

micha17:02:57

you can do it from the process explorer, supposedly

laforge4917:02:10

MS designed windows to make it difficult to port ux programs.

micha17:02:12

but then i think the process that has the thing open will be in an undefined state

laforge4917:02:45

they wanted their own software echosystem

micha17:02:30

yeah it seems hopeless

laforge4917:02:18

As a long-term windows user, I'll admit to never having been a fan. And I can't stand windows path names.

micha17:02:41

i remember reading about daemons you can run on your windows machine that will delete files whenever they can

micha17:02:47

so you'd load some paths in there

micha17:02:50

and it polls them

laforge4917:02:55

And it really irks me when on the news they say backslash when describing a URL!

micha17:02:59

and if they ever become unlocked it deletes them

micha17:02:03

hilarious

laforge4917:02:39

but forget all that. Have a couple on me tonight Micha! Thanks ever so much for 2.6.0-SNAPSHOT!

micha17:02:51

haha thanks

micha17:02:14

i bet that solves all the problems

micha17:02:52

then you can do docker run adzerk/boot-cljs:2.5.5 repl

micha17:02:54

or whatever

laforge4917:02:20

Do I then need to use linux?

micha17:02:37

it's just boot that will be running in a linux vm

laforge4917:02:00

I don't need to provide any files???

micha17:02:20

youd need to expose directories to the docker container

micha17:02:32

and expose ports from the container on your machine

laforge4917:02:33

windows directories??

donmullen18:02:20

@micha perhaps a link to that docker install and how to use it would be helpful for other windows users — put on boot wiki?

micha18:02:44

if it works, yes simple_smile

micha18:02:11

that seems like the most productive avenue to explore though

micha18:02:25

since it attacks the cause, not just some symptoms

micha18:02:51

that would fix all the other issues related to paths as well

micha18:02:03

i wonder if there is a way to package a docker image as a windows exe?

micha18:02:08

that would be sweet

micha18:02:22

especially if it could autoinstall docker if it needs to

micha18:02:47

then i could just put the docker image up there for people to download

laforge4918:02:56

Why not a docker image with clojure and boot pre-installed.

micha18:02:09

that's what we already have

micha18:02:36

if you install docker you can use it

dviramontes18:02:54

Hello all, im getting this weird message when i try to run my dev boot task:

Feb 02, 2016 10:50:03 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host: No route to host
Feb 02, 2016 10:50:04 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
would anyone here know what thats about ? (for reference im using this boot template: https://github.com/martinklepsch/tenzing)

micha18:02:49

can you do boot by itself?

juhoteperi18:02:55

Clojars in down

kanwei18:02:17

I followed the instructions to use the mirror, but my boot instance is still hanging with no feedback

micha18:02:34

if you have 2.6.0-SNAPSHOT you can set BOOT_CLOJARS_REPO=<other url>

kanwei18:02:15

alright it took its time but loaded

dviramontes18:02:08

@micha: boot looks good, prints usage and such @juhoteperi: thanks, that would explain it right ?

richiardiandrea19:02:44

hello guys, i am working on a test task, and I was wondering if you could help me to specify options from the command line for this: https://github.com/arichiardi/boot/commit/32085dc71eceebe311fabd91f1a2732da2995f7a#diff-a4c54fc631a18b940822c4cc9a9251e1R871

richiardiandrea19:02:54

works fine from build.boot

richiardiandrea19:02:42

(runtests :cmds '#{[test/sift-with-meta-tests]
                     [test/sift-with-meta-invert-tests]})

richiardiandrea19:02:42

boot runtests --cmds "[test/sift-with-meta-tests]" --cmds "[test/sift-with-meta-invert-tests]"

richiardiandrea19:02:37

throws: java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.String

richiardiandrea19:02:36

probably I am not calling it right

micha19:02:04

boot.user=> (deftask foo [x xx ARG #{code} "asdf"] (with-pass-thru [x] (prn :xx xx)))
#'boot.user/foo
boot.user=> (boot "foo" "-x" "[inc]")
:xx #{[#object[clojure.core$inc 0x701a358b "clojure.core$inc@701a358b"]]}
nil

micha19:02:51

boot.user=> (boot "foo" "-x" "[inc]" "-x" "[dec]")
:xx #{[#object[clojure.core$inc 0x701a358b "clojure.core$inc@701a358b"]] [#object[clojure.core$dec 0x20bdc1da "clojure.core$dec@20bdc1da"]]}
nil

micha19:02:14

oh you're quoting it

micha19:02:47

boot.user=> (deftask foo [x xx ARG #{edn} "asdf"] (with-pass-thru [x] (prn :xx xx)))
Warning: deftask boot.user/foo was overridden
#'boot.user/foo
boot.user=> (boot "foo" "-x" "[inc]" "-x" "[dec]")
:xx #{[dec] [inc]}
nil

richiardiandrea19:02:47

mmm...the arg in my case is #{[edn]} but maybe it does not make too much sense...

richiardiandrea19:02:03

it is a set of seq of commands

micha19:02:12

i think that is beyond the capabilities of the simple parser thing

richiardiandrea19:02:41

will revert to strings

micha19:02:45

but the user can put the [] on the command line options

micha19:02:51

if they're necessary

richiardiandrea19:02:46

I will need to add an assert in the code then, ok, thanks a lot @micha!

micha19:02:52

boot.user=> (deftask foo [x xx ARG:FOO #{[edn edn]} "asdf"] (with-pass-thru [x] (prn :xx xx)))
Warning: deftask boot.user/foo was overridden
#'boot.user/foo
boot.user=> (boot "foo" "-x" "inc" "-x" "dec")
:xx #{[dec nil] [inc nil]}
nil

micha19:02:05

kind of a hack, not so good

richiardiandrea19:02:59

yeah..the point was to have #{[task :opts "arg"] [task :asda :foo]}

richiardiandrea19:02:10

so that you can test whatever

richiardiandrea19:02:32

it works in build.boot, I guess we can live with less flexibility in the cmd line

micha19:02:45

i think you just want strings

richiardiandrea19:02:40

forms are nice in build.boot, in any case everyting is converted to string passing to runboot 😄

micha19:02:26

(deftask foo [c cmds CMD ^:! [str] "asdf"] (with-pass-thru [x] (prn :xx cmds)))

micha19:02:33

like that

micha19:02:53

or something

micha19:02:29

i guess the main issue is that there is no way to do like an unparsing

micha19:02:00

like converting the other way, from clj to command line string

micha19:02:10

the parser would need to run backwards then

richiardiandrea19:02:50

I will try a couple of solutions...I still need to work on deftesttask 😄

richiardiandrea19:02:29

these details will be defined later maybe during the review ok? thanks for confirming it did not work

richiardiandrea20:02:05

Hello everybody, my PR for boot tests is ready for the battle (https://github.com/boot-clj/boot/pull/401):

- clone `arichiardi:sift-fix-test` (some people prefer remotes)
- make install
- cd boot/core
- boot test
The report I agree are messy as I copied clojure.test without shame 😄 They can be improved especially if we want a report per task.

mj_langford21:02:42

I’m trying to debug a boot dev failure

mj_langford21:02:09

where do dependencies end up with boot once downloaded?

mj_langford21:02:26

I feel like I’m failing at google as far as finding more in-depth documentation on boot

micha21:02:38

they end up in BOOT_LOCAL_REPO, which is ~/.m2 by default

micha21:02:04

you can set it with that environment variable