Fork me on GitHub
#boot
<
2015-12-28
>
crocket05:12:09

Does anyone have a nodejs clojurescript application template for boot?

micha16:12:53

like 90% documentation coverage now

dm316:12:51

seems like a good time to do a complete rewrite simple_smile

dm316:12:56

great job!

laforge4918:12:35

boot -u does not pull snapshots. 😞

micha18:12:03

no, but also there are no snapshots to pull currently simple_smile

micha18:12:28

perhaps i'll add that to 2.6.0-SNAPSHOT

micha18:12:34

boot -U perhaps

laforge4918:12:22

Looking forward to the day when I can wing hoplon projects the way I can do java. But at least I am making enough steady progress now to keep me encouraged.

adamfrey21:12:06

I remember seeing in this channel not long ago someone having a problem making an uberjar and conflicting files named LICENSE. Slack search doesn’t get me back far enough to find it. Does anybody remember the solution to that problem?

adamfrey21:12:40

I’m getting this error while creating an uberjar:

java.nio.file.DirectoryNotEmptyException: /Users/adam/.boot/cache/tmp/Users/adam/work/visclay/backend/14sd/6qp7pj/META-INF/LICENSE

micha21:12:01

@adamfrey: which version of boot?

micha21:12:34

hm, that should have been fixed

adamfrey21:12:19

wait, I might need to update the version in my project, just a sec

adamfrey21:12:50

trying again

adamfrey21:12:03

working now, I see the merge message. I didn’t realized that was fixed in boot. Thanks!

micha21:12:25

whew! i had that sinking feeling

adamfrey21:12:17

btw, in the burgeoning CLJS+React Native world, there is a Boot library that is gaining mindshare: https://github.com/mjmeintjes/boot-react-native. The author explained in this github issue why choosing Boot over Lein made the tooling so much easier: https://github.com/mjmeintjes/boot-react-native/issues/1#issuecomment-167656801

alandipert21:12:53

@adamfrey: cool thanks for sharing!

bloemelau21:12:45

I'm having a lot of trouble getting the boot.exe to work on my windows 7.

bloemelau21:12:19

wheneever I open it, it creates 3 processes and never responds from there

micha21:12:38

how are you starting boot?

bloemelau21:12:45

via command prompt

bloemelau21:12:01

either -u and -h options hang

bloemelau21:12:57

If the command prompt has elevation, then it will also not respond and make the processes persistent

micha21:12:44

what does boot.exe --version say?

bloemelau21:12:06

I'll talk through my process of using it: 1. Download the exe 2. Put it onto a path that was in %PATH% 3. Open a cmd and run as instructed.

bloemelau21:12:19

that does nothing

micha21:12:53

which version of java do you have?

micha21:12:23

maybe it's a virus blocker situation?

micha21:12:58

hm that's ok

micha21:12:18

the antivirus is the only thing i can think of

micha21:12:38

i'm not sure why 3 processes are started

micha21:12:44

can you see what their names are?

bloemelau21:12:57

all boot.exe

bloemelau21:12:38

Does it normally require elevation to use it?

micha21:12:53

what is elevation?

micha21:12:57

like root access?

bloemelau21:12:06

as in run as admin on windows

bloemelau21:12:10

so yea like root access

micha21:12:15

it shouldn't need anything like that

micha21:12:30

it will try to dowload things from the internet though

micha21:12:39

via maven and from github releases

micha21:12:15

it will also create directories in your home dir

micha22:12:24

windows10 should be fully operational

bloemelau22:12:57

what directories should it create? .boot?

micha22:12:06

that's it

bloemelau22:12:16

I don't have it

bloemelau22:12:23

I just figured ot would be called that

micha22:12:28

do you have antivirus software running?

bloemelau22:12:37

yea, avast 2015

micha22:12:03

seems like that would be a possible cause for just hanging

micha22:12:24

or a network problem

micha22:12:49

like insufficient permission to download boot.jar from github releases

micha22:12:11

it will try to download that and cache it in ~/.boot

bloemelau22:12:26

it's working!

bloemelau22:12:29

It was avast

micha22:12:42

sweet! 🍻

micha22:12:29

those 3 outstanding issues, if you don't experience them (like for example if recent boot updates have fixed any of those problems) could you please make note of it on the issue if you get a chance?

bloemelau22:12:36

I'll try to remember. I'll be trying out cljs since lein is a pain in the ass for that apparently. Are those errors plausible in that context?

micha22:12:51

could be, yeah

micha22:12:07

it has to do with the way boot uses hardlinks internally

bloemelau22:12:14

Ok. Anyhow, thanks for resolving the issue! Will add the boot.exe to the whitelist of avast

micha22:12:25

so incremental builds will probably demonstrate the issue more than production builds

adamfrey22:12:48

Using Boot 2.5.3, creating an uberjar doesn’t generate the uberjar name from the pom file. It works on the same project using 2.4.2

adamfrey22:12:10

Here’s my uberjar task:

(deftask uberjar
  "Builds an uberjar of this project that can be run with java -jar"
  []
  (comp
    (aot :namespace '#{alto.visclay.core})
    (pom :project 'visclay :version +version+)
    (uber)
    (jar :main 'alto.visclay.core)))

alandipert22:12:22

check out the :file option to jar

alandipert22:12:34

and the changelog, jar doesn't pick the name from the pom anymore (necessarily)

adamfrey22:12:06

oh ok. thanks!

micha22:12:39

yeah if there are multiple poms in the jar it used to arbitrarily pick the first one it found

micha22:12:59

not always the correct choice simple_smile

micha22:12:22

so now it will make a friendly jar name if there is exactly one pom in the jar

adamfrey22:12:58

oh interesting, I didn’t realize I had more than one pom

micha22:12:33

that's another thing, we used to filter out all poms from the uber

micha22:12:36

by default

micha22:12:58

but that was causing issues with some uberjars where the library depended on being able to find its own pom in the jar

micha22:12:03

to identify its version

adamfrey22:12:42

ok, that’s the missing piece

bloemelau22:12:57

@micha: I get the same exception as in [issue 76](https://github.com/boot-clj/boot/issues/76) for the command boot serve -d target watch cljs and I overwrite a file.

bloemelau22:12:57

As well as a java.util.concurrent.ExecutionException

micha22:12:17

@bloemelau: can you try with clojure 1.8.0-RC4?

micha22:12:35

i think they fixed an issue in clojure that is related

bloemelau22:12:02

So I changed the deps to [org.clojure/clojure "1.8.0-RC4"], is that allright?

bloemelau22:12:10

That has the same result

micha22:12:53

also BOOT_CLOJURE_VERSION

micha22:12:16

boot needs to load some version of clojure that your build.boot will run in

micha22:12:28

so that needs to be set via boot.properties or env var

bloemelau23:12:08

Same result again after changing BOOT_CLOJURE_VERSION=1.8.0-RC4 in boot.properties

micha23:12:28

bummer, so it's not the clojure issue

bloemelau23:12:22

Is it possible that there are some race conditions of some kind, or that the file isn't closed before reopening it? If I start the command and then overwrite the file while compiling it will recompile it without a problem, but overwriting after boot is waiting will result in an error: >Writing main.cljs.edn... >Compiling ClojureScript... >ò main.js >Implicit target dir is deprecated, please use the target task instead. >Set BOOT_EMIT_TARGET=no to disable implicit target dir. >Elapsed time: 9,921 sec > >Writing main.cljs.edn... >Compiling ClojureScript... >ò main.js >Elapsed time: 0,480 sec > >Writing main.cljs.edn... >Compiling ClojureScript... >ò main.js >java.util.concurrent.ExecutionException: java.nio.file.AccessDeniedException: ta >rget\main.out\modern_cljs\core.js

micha23:12:03

what if you set BOOT_EMIT_TARGET=no

micha23:12:08

does that help?

micha23:12:08

you can set that in boot.properties or environment veriables

bloemelau23:12:32

Yes, that fixed it. should have heeded the deprecation warning

micha23:12:37

ok one more thing

micha23:12:48

what was the command line invocation you used?

micha23:12:53

for that build

bloemelau23:12:43

boot serve -d target watch cljs

micha23:12:51

ok cool, can you try this:

micha23:12:11

boot serve watch cljs

micha23:12:27

that -d target is probably not what you want

bloemelau23:12:41

yea, I figured simple_smile

micha23:12:11

if that works, then you could try this

micha23:12:18

boot serve watch cljs target

micha23:12:32

and that will hopefully do all the things, and also write files to the target dir

bloemelau23:12:59

yes that works (first one)

micha23:12:19

with 2.5.0 we deprecated the automatic writing of files to the target dir

micha23:12:25

and we added a target task

micha23:12:40

because we realized that we rarely actually use the target dir

micha23:12:55

we either run the thing in dev mode, which uses the classpath exclusively

micha23:12:08

or we deploy to eg. s3 or the cloud somewhere

micha23:12:33

so we never actually want files in the target dir

micha23:12:54

and it can be quite expensive to copy target files

bloemelau23:12:05

boot serve watch cljs target makes exceptions on the first compilation now: >java.util.concurrent.ExecutionException: java.nio.file.FileSystemException: targ >et\main.out\modern_cljs\core.js -> C:\Users\Laurens\.boot\cache\tmp\Files\Dev\Cl >ojure\2015\clojurescript\tutorials\modern-cljs\ng\f0sqpx\main.out\modern_cljs\co >re.js: The system cannot move the file to a different disk drive. followed by java.nio.file.FileSystemException and even a sun.nio.fs.WindowsException.translateToIOException

bloemelau23:12:20

So I'll try to change drives for the source

micha23:12:51

it's best to have .boot dir on the same filesystem as your project

bloemelau23:12:30

Ok, it seems to be working now!

micha23:12:52

if you change something in cljs and reload the web page you see the change, right?

micha23:12:40

if you could drop a note on the github issue that would be greatly appreciated!

micha23:12:22

feels good to finally make some progress on those ancient issues

bloemelau23:12:13

I'll do that tomorrow (lucky I have a log of what I did in this chat simple_smile ) Thanks again for the help!

micha23:12:31

good luck! simple_smile

bloemelau23:12:21

Do you want me to try for the minimal working change? Most likely the only change really necessary wad the target and the source location