Fork me on GitHub
#alda
<
2016-09-06
>
oatman18:09:49

Evening all, I just tried to dev alda, and as a newcomer to clojure, I've tripped at the first hurdle: https://github.com/alda-lang/alda/issues/262

oatman18:09:32

if anyone can shed light on this, I'd be most grateful

oatman18:09:48

good evening!

dave18:09:09

are you sure you're on the latest commit? should be ac069b

dave18:09:06

i am able to run boot dev -a server --port 27713 --alda-fingerprint

oatman18:09:07

commit ac069b795b6a6df988537802aeec493d6448b086
Author: Dave Yarwood <[email protected]>
Date:   Mon Sep 5 17:11:33 2016 -0400

    add some quantization for character

oatman18:09:16

latest after a pull for me

dave18:09:21

yeah, that's the one -- interesting, it must have a different commit sha on your fork

oatman18:09:29

that IS interesting

dave18:09:37

looking at the stacktrace, i'm guessing this is something boot-related

oatman18:09:41

I bet that's an edge case that catches people out

oatman18:09:05

yeah, it's odd

oatman18:09:09

I'll reinstall boot

dave18:09:17

that may help

dave18:09:22

i was going to say, can you post the output of boot -V ?

oatman18:09:33

#
#Tue Sep 06 19:47:27 BST 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.5.5

dave18:09:44

looks just like what i have

dave18:09:59

there is a boot.properties file in the alda repo which ought to keep everyone in sync

dave18:09:06

so, this could be something weird with your boot setup

dave18:09:34

i would recommend deleting your boot directory (i think it is ~/.boot by default, but better check to make sure before deleting it!)

dave18:09:43

it will re-generate when you run boot again

dave18:09:50

there may something weird cached there

oatman18:09:54

yeah, just did that

oatman18:09:02

same error

oatman18:09:11

right after bootstrapping boot, it seems:

dave18:09:15

what is your java -version ?

oatman18:09:19

boot dev -a server --port 27713 --alda-fingerprint
Downloading ...
Compiling 12 Java source files...
             clojure.lang.ExceptionInfo: java.lang.NullPointerException
    data: {:file "/tmp/boot.user7170302423713877086.clj", :line 31}
java.util.concurrent.ExecutionException: java.lang.NullPointerException
         java.lang.NullPointerException: 
com.sun.tools.javac.api.JavacTool.getTask  JavacTool.java:  125
com.sun.tools.javac.api.JavacTool.getTask  JavacTool.java:  107
com.sun.tools.javac.api.JavacTool.getTask  JavacTool.java:   64
                                      ...                      
           boot.task.built-in/fn/fn/fn/fn    built_in.clj:  591
                      boot.core/run-tasks        core.clj:  794
                        boot.core/boot/fn        core.clj:  804
      clojure.core/binding-conveyor-fn/fn        core.clj: 1938
                                      ...     

oatman18:09:31

java -version
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)

oatman18:09:47

and I'm on arch linux, if that affects anything

dave18:09:27

ok, so if boot repl works for you, and the stacktrace contains javac stuff, i'm betting it's something to do with the javac task

dave18:09:35

which compiles the java code

dave18:09:51

it's not strictly necessary if you're not messing with the client code though

dave18:09:59

like if you're only working with the clojure code

oatman18:09:16

interesting

oatman18:09:30

openjdk alright to use?

dave18:09:34

yeah, it should be

dave18:09:13

i'm guessing this is an edge case with your particular flavor of JDK and boot's javac task

oatman18:09:26

aha, that seems to work!

oatman18:09:30

spawning workers

dave18:09:35

awesome! have fun 🙂

oatman18:09:45

brilliant, so I'll be ok now?

dave18:09:11

think so -- feel free to ping me if you have any more questions. i'm at work now though, so i may not be super available until 2-3 hours from now

oatman18:09:20

ah, apologies

dave18:09:24

no worries!

oatman18:09:54

I'll make that PR asap, but it'll be a WIP one, I'll continue the conversation there, if I may?

oatman18:09:08

asynchronous comms

dave18:09:13

yep, sounds good!

oatman18:09:23

great, thanks so much and have a great day!

dave18:09:49

BTW, i just saw something interesting that might explain the javac null pointer error: https://github.com/alda-lang/alda/blob/master/build.boot#L62

dave18:09:11

that (System/getenv "JDK7_BOOTCLASSPATH") thing probably doesn't like when it isn't set

oatman18:09:26

yeah, I'm indeed on 8

dave18:09:44

i am too, but i have some options in there that will compile alda to be runnable even if the user is on java 7

dave18:09:54

i didn't think about how that might affect the dev task though

dave18:09:42

@oatman i just made a quick fix on a branch -- would you mind trying this commit? 66383ce40910fe94ed9080632b80d5f35608c9a0

oatman18:09:55

of course!

dave19:09:03

awesome, thx

oatman19:09:58

yep, that's done the trick!

dave19:09:09

i'll merge that to master

oatman19:09:12

>compiling 12 java source files

dave19:09:16

beautiful

dave19:09:43

it will still fail if you want to do boot build to create the alda executable

dave19:09:51

but hopefully with the boot dev task setup you shouldn't need to do that

oatman19:09:03

great, sounds like I won't need to do that

dave19:09:35

yep - ok, i'm off -- cheers!