Fork me on GitHub
#boot
<
2017-09-29
>
kenny00:09:07

Yeah not sure what is going on but it makes developing Boot tasks at the REPL pretty much impossible.

danielcompton02:09:17

I've noticed some weirdness defining vars in the Cursive REPL occasionally, although I'm not sure if that's Cursive, my project, or boot

qqq02:09:25

1. In build.boot :dependencies, I have:

[org.boofcv/all "0.26"]
2. in a clj file, I have:
(ns server.snip.boof
  (:import [boofcv.struct.image GrayU8]))
I get a ClassNotFound boofcv.struct.Image.GrayU8 exception From JavaDocs, this class exists and should be loaded. How do I debug this?

qqq02:09:49

Core problem is: I think I have a jar/class added as a dependency, but I try to import it from clojure land, it says not found. I don't know how to debug this.

qqq03:09:51

I figured it out, by looking inside jars in ~/.m2 ; turns out, I was requesting the wrong dependency

michal07:09:07

hi guys. do you have any plans to release in a near future new boot version, compatible with java 9?

djebbz13:09:34

Hello, when using boot pom jar push, the push task is trying to push the project dependencies to the configured repository.

chris13:09:12

is that not what it's supposed to do?

lsnape14:09:02

alandipert that’s not what I’m seeing. cljs task triggers compilation lasting 20-30 seconds on a medium-sized project when .scss or .clj files are changed.

dominicm14:09:43

@michal to my knowledge, boot is compatible with java 9 today.

dominicm14:09:57

@michal are you having issues?

michal15:09:08

@dominicm yup:

Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
	at Boot.loadJar(Boot.java:228)
	at Boot.main(Boot.java:254)

michal15:09:25

boot 2.7.2

dominicm15:09:59

@michal on the latest boot-bin also? (I don't know how to check that)

dominicm15:09:32

https://github.com/boot-clj/boot-bin/releases/ there is a new version of the boot base script, that is versioned the same as boot.jar

dominicm15:09:07

Not sure if you have to do boot --upgrade or just drop in the shell script over the top

michal15:09:18

i'm not sure about boot-bin. I will try to update is as well

dominicm15:09:56

try the upgrade thing first, otherwise do whereis boot and drop the boot-bin over the top (or use brew or whatever package manager if that's your thing)

michal15:09:17

great. there are few warnings, but looks like it works now 🙂

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by dynapath.defaults$fn__1516$fn__1517 (file:/Users/michal/.m2/repository/boot/pod/2.7.2/pod-2.7.2.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of dynapath.defaults$fn__1516$fn__1517
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

dominicm15:09:05

I thought dynapath had this all cleared up :thinking_face:

michal15:09:41

hm.. where can I verify that?

dominicm15:09:20

maybe it doesn't, having reviewed the readme 🙂

phreed16:09:35

I am looking for a simple example demonstrating compiling java. I am writing antlr4 tasks (antlr4 :lexer :parser) which generate intermediate java files into a fileset.

alandipert16:09:52

phreed https://github.com/RadicalZephyr/boot-javac-star might interest you. in addition to compiling, it adds the generated .class files to the classpath

alandipert16:09:59

lsnape i wouldn't expect that, but i'm no longer a cljs task expert... maybe juhoteperi has some insight?

dominicm17:09:50

Scss shouldn't cause it. @lsnape but .clj should because of macros.

dominicm17:09:23

Maybe not 30s though, that sounds like a bad macro expansion (speculation: I think that's the cause of problems)

lsnape17:09:47

Ah, well we’re using macros to get all the strings that are displayed on our site, so could be the cause of excessive wait times.

lsnape17:09:50

Better to load the translations from a static resource than use cljs macros. I’ve never been a fan of the approach!

dominicm17:09:09

Yeah, you might want to use constants or something

alandipert18:09:03

oh yeah, if you're using macros for that, you might consider extracting that generation into a separate (caching) task

nha19:09:11

@alandipert @micha I am sure you know this already but looks like the adzert website is having some trouble

alandipert19:09:18

nha which one?

Andrew Sharp21:09:28

is there a way to unit test boot tasks? i’m trying to write a task that generates a generic Dockerfile and would like to unit test it

richiardiandrea21:09:59

@andrew.sharp57 there is, it is in boot.test...you can use clojure.test but in the context of a boot task

richiardiandrea21:09:03

the deftesttask composes tasks sequentially where the last one contains is checks

Andrew Sharp23:09:22

attempting to write a task that composes jar and install. having trouble getting install to find the jarfile. this is my task’s output on the command line:

Compiling 1/1 ags799.boot-docker../..
Writing pom.xml and pom.properties../..
Adding uberjar entries../..
Writing boot-docker-0.0.0-6-g8c1837f-dirty.jar../..
Installing boot-docker-0.0.0-6-g8c1837f-dirty.jar../..
...
java.io.FileNotFoundException: boot-docker-0.0.0-6-g8c1837f-dirty.jar (No such file or directory)
   clojure.lang.ExceptionInfo: boot-docker-0.0.0-6-g8c1837f-dirty.jar (No such file or directory)
i’m pretty confused by this output, it seems like install is trying to install the same file that jar wrote. is there something obviously wrong here? i can provide code if that helps. thanks

Andrew Sharp00:09:33

figured this out, all is well