alda

WE'VE MOVED! Join us at: http://slack.alda.io
oatman 2016-09-06T18:41:49.000002Z

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

oatman 2016-09-06T18:42:32.000004Z

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

oatman 2016-09-06T18:43:42.000005Z

cc dave

dave 2016-09-06T18:44:40.000006Z

hey @oatman

oatman 2016-09-06T18:44:48.000007Z

good evening!

dave 2016-09-06T18:45:09.000008Z

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

dave 2016-09-06T18:46:06.000009Z

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

oatman 2016-09-06T18:46:07.000010Z

commit ac069b795b6a6df988537802aeec493d6448b086
Author: Dave Yarwood <dave.yarwood@gmail.com>
Date:   Mon Sep 5 17:11:33 2016 -0400

    add some quantization for character

oatman 2016-09-06T18:46:16.000011Z

latest after a pull for me

dave 2016-09-06T18:46:21.000012Z

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

oatman 2016-09-06T18:46:26.000013Z

aaah

oatman 2016-09-06T18:46:29.000014Z

that IS interesting

dave 2016-09-06T18:46:37.000015Z

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

oatman 2016-09-06T18:46:41.000016Z

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

oatman 2016-09-06T18:47:05.000017Z

yeah, it's odd

oatman 2016-09-06T18:47:09.000018Z

I'll reinstall boot

dave 2016-09-06T18:47:17.000019Z

that may help

dave 2016-09-06T18:47:22.000020Z

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

oatman 2016-09-06T18:47:33.000021Z

#<http://boot-clj.com>
#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

dave 2016-09-06T18:47:44.000022Z

looks just like what i have

dave 2016-09-06T18:47:59.000023Z

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

dave 2016-09-06T18:48:06.000024Z

so, this could be something weird with your boot setup

dave 2016-09-06T18:48:34.000025Z

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

dave 2016-09-06T18:48:43.000026Z

it will re-generate when you run boot again

dave 2016-09-06T18:48:50.000027Z

there may something weird cached there

oatman 2016-09-06T18:48:54.000028Z

yeah, just did that

oatman 2016-09-06T18:48:56.000029Z

huh

oatman 2016-09-06T18:49:02.000030Z

same error

oatman 2016-09-06T18:49:11.000031Z

right after bootstrapping boot, it seems:

dave 2016-09-06T18:49:15.000032Z

what is your java -version ?

oatman 2016-09-06T18:49:19.000033Z

boot dev -a server --port 27713 --alda-fingerprint
Downloading <https://github.com/boot-clj/boot/releases/download/2.5.5/boot.jar>...
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
                                      ...     

oatman 2016-09-06T18:49:31.000034Z

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)

oatman 2016-09-06T18:49:47.000035Z

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

dave 2016-09-06T18:50:27.000037Z

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

dave 2016-09-06T18:50:35.000038Z

which compiles the java code

dave 2016-09-06T18:50:51.000039Z

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

dave 2016-09-06T18:50:59.000040Z

like if you're only working with the clojure code

oatman 2016-09-06T18:51:16.000041Z

interesting

dave 2016-09-06T18:51:23.000042Z

try commenting out this line: https://github.com/alda-lang/alda/blob/master/build.boot#L184

oatman 2016-09-06T18:51:30.000045Z

openjdk alright to use?

oatman 2016-09-06T18:51:32.000046Z

ok

dave 2016-09-06T18:51:34.000047Z

yeah, it should be

dave 2016-09-06T18:52:13.000048Z

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

oatman 2016-09-06T18:52:26.000050Z

aha, that seems to work!

oatman 2016-09-06T18:52:30.000051Z

spawning workers

dave 2016-09-06T18:52:35.000052Z

awesome! have fun 🙂

oatman 2016-09-06T18:52:45.000053Z

brilliant, so I'll be ok now?

dave 2016-09-06T18:53:11.000054Z

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

oatman 2016-09-06T18:53:20.000055Z

ah, apologies

dave 2016-09-06T18:53:24.000056Z

no worries!

oatman 2016-09-06T18:53:54.000057Z

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

oatman 2016-09-06T18:54:08.000058Z

asynchronous comms

dave 2016-09-06T18:54:13.000059Z

yep, sounds good!

oatman 2016-09-06T18:54:23.000060Z

great, thanks so much and have a great day!

dave 2016-09-06T18:54:49.000061Z

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

oatman 2016-09-06T18:54:54.000063Z

oh

oatman 2016-09-06T18:55:05.000064Z

ah!

oatman 2016-09-06T18:55:09.000065Z

could be

dave 2016-09-06T18:55:11.000066Z

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

oatman 2016-09-06T18:55:26.000067Z

yeah, I'm indeed on 8

dave 2016-09-06T18:55:44.000068Z

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

oatman 2016-09-06T18:55:51.000069Z

oh

dave 2016-09-06T18:55:54.000070Z

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

oatman 2016-09-06T18:56:00.000071Z

righto

dave 2016-09-06T18:59:42.000072Z

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

oatman 2016-09-06T18:59:55.000074Z

of course!

dave 2016-09-06T19:00:03.000075Z

awesome, thx

oatman 2016-09-06T19:00:58.000076Z

yep, that's done the trick!

dave 2016-09-06T19:01:05.000077Z

🏆

dave 2016-09-06T19:01:09.000078Z

i'll merge that to master

oatman 2016-09-06T19:01:12.000079Z

>compiling 12 java source files

dave 2016-09-06T19:01:16.000080Z

beautiful

oatman 2016-09-06T19:01:26.000081Z

neato

dave 2016-09-06T19:01:43.000082Z

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

dave 2016-09-06T19:01:51.000083Z

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

oatman 2016-09-06T19:02:03.000084Z

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

dave 2016-09-06T19:02:35.000085Z

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

oatman 2016-09-06T19:05:01.000086Z

cheerio!