Fork me on GitHub
#boot
<
2015-11-07
>
domkm00:11:15

I upgraded to boot-cljs 1.7.170-1 and am now getting a Uncaught TypeError: cb is not a function nexttick.js:185. The error disappears if I remove boot-cljs-repl (0.2.0), though I don't see cb in boot-cljs-repl source.

alandipert00:11:32

@domkm: are you :advanced compiling? altho it's hard to tell if cb is closure minified name or idiomatic clojure lol

domkm01:11:18

@alandipert: Nope, using :none

esp101:11:59

is there a way to add native lib dependencies to boot tasks? i’m messing around with opencv and i have the libopencv_java300.dylib packaged into a jar and installed in my local maven repo, but it doesn’t seem to work when i add it to the boot env :dependencies. it works fine in lein tho.

micha01:11:36

boot doesn't include a mechanism for that

micha01:11:23

it's kind of a hack i think, based on various conventions that aren't standardized

micha01:11:15

you would need to put the system dependent things in a directory then add that to the jvm library path

micha01:11:57

i believe there is a version of opencv that has its own native library loader

esp103:11:46

another boot question: shouldn't there be a way to specify classifier in the pom task?

esp103:11:17

i was just digging around clojars and it’s unclear to me if they support classifiers, but certainly other maven repos do

micha03:11:00

@esp1 have you tried it?

micha03:11:28

i'm not sure if aether supports that, or pomegranate

micha03:11:35

it would be interesting to know

micha03:11:16

although i can't figure out exactly what the purpose of them really is

esp103:11:38

i haven’t tried publishing a jar with classifiers into clojars yet, if that’s what you mean, but i did note that the boot pom task doesn’t have a way to specify them

esp103:11:50

they’re often used for source jars, for example

esp103:11:11

also sometimes for native dependencies, but like you said that’s not terribly standardized

micha03:11:38

ah that makes sense

micha03:11:56

basically for things outside the actual dependency graph

micha03:11:54

can you link me to a deployed pom that has classifiers?

esp103:11:32

sure, 1 sec

micha03:11:22

ah so it doesn't appear to be part of the pom.xml in fact

esp103:11:39

really? i thought it was..

micha03:11:43

i believe the classifiers distinguish between multiple artifacts all deployed with the same pom

micha03:11:08

it must be in the repo metadata

esp103:11:33

oh yeah - looks like it’s only used in the dependency spec. so weird, i always thought it was part of the source pom

micha03:11:28

it's in the file name

esp103:11:29

you can specify it via mvn install:install-jar -Dclassifier=xyz … when you’re publishing to the repo,

micha03:11:53

yeah i think that's just naming the jar a special way

micha03:11:30

maven2/org/bytedeco/javacpp-presets/videoinput/0.200-1.1/videoinput-0.200-1.1-android-arm.jar

esp103:11:37

huh, TIL maven is weird

esp103:11:47

actually, no i knew that long, long ago

micha03:11:58

well their repo system is simple enough

micha03:11:05

which is a relief

micha03:11:11

i bet boot can do it

micha03:11:24

you just need to name the jar correctly

micha03:11:06

the install task could take a classifier

micha03:11:12

and you can test locally too

esp103:11:24

i’ll give it a shot

micha03:11:36

:thumbsup:

esp103:11:46

thx for talking me through this

micha03:11:01

pull request relcomed if you figure it out simple_smile

micha03:11:04

*welcomed

clem05:11:49

Is there a boot task that’s the equivalent of maven’s dependency:unpack?

micha05:11:28

@clem: what does that do?

micha05:11:41

explode jars into the filesystem?

micha05:11:57

boot uber

clem05:11:01

Where the jar is a listed dependency.

micha05:11:18

boot -d tailrecursion/warp uber show -f

clem05:11:32

Cool, I’ll give that a go. Thanks.

micha05:11:45

boot uber --help for allt he details

clem05:11:49

Is there a directory of built-in tasks? The listing at https://github.com/boot-clj/boot/wiki/Built-In-Tasks seems a little on the sparse side.

micha05:11:22

haha yeah it's a work in progress

micha05:11:40

i started with the first one, alphabetical order

micha05:11:54

you can do boot -h

micha05:11:18

each individual task has help at the command line via boot <task> --help

micha05:11:27

or in the repl (doc <task>)

clem05:11:34

Nice. That should get me started.

micha05:11:50

what are you wanting to do?

micha05:11:06

there may be a scaffold or example to look at

clem05:11:10

We’ll, I’m looking to create project templates that compile markdown documents into PDFs and deploys them to the maven repo.

clem05:11:41

I’ve implemented such a system in maven and looking to port it to boot.

micha05:11:05

oh interesting

clem05:11:24

So looking to do things like maven archetypes.

micha06:11:55

in boot you can do all that stuff with tasks

clem06:11:09

That’s the gist of what I’m seeing. The feel reminds me a bit of gradle.

micha06:11:38

yeah definitely more gradle than maven

micha06:11:57

but way more gradle than gradle

clem06:11:12

BTW, is there currently a means of specifying a type other than “jar” for a dependency?

micha06:11:33

sure, you can use any of the things that pomegranate supports

micha06:11:10

boot uses pomegranate, so all of that is supported

clem06:11:27

Ok, looks like boot is possibly inserting “jar” as a classifier even if one is specified. So:

boot -d my-group:my-artifact:zip:bundle:1.0.0 uber show
Results in:
java.lang.IllegalArgumentException: Bad artifact coordinates my-group:my-artifact:jar:zip:bundle:1.0.0, expected format is <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
Looking through the source to confirm.

micha06:11:21

that's the command line

micha06:11:43

the command line parsing is simplified

micha06:11:21

like do this boot repl

micha06:11:00

and when you have a repl try (set-env! :dependencies '[[my-group/my-artifact "1.2.3" :extension "zip"]])

micha06:11:19

following the format you see in the link i pasted above

clem06:11:48

Ok, excellent, that works.

clem06:11:40

Going to call it a night, but I appreciate the help. Look forward to digging into boot further.

micha06:11:11

good luck simple_smile

thedavidmeister08:11:10

hey, if i fork a dependency in github to fix a bug, how do i tell boot to use my fork so I can test it and until the PR is accepted upstream?

juhoteperi08:11:59

@thedavidmeister: You can install the library to your local maven repository with lein install / boot build-jar / boot pom jar install

thedavidmeister08:11:31

hmm, “no such task (build-jar)"

thedavidmeister08:11:37

i’ll try one of the other ones

juhoteperi08:11:47

build-jar is for Boot projects using bootlaces

juhoteperi08:11:19

lein command is obviously for lein projects simple_smile

juhoteperi08:11:28

You should check what tasks project's build.boot defines

pandeiro14:11:18

I'd like to embed the current commit in my boot-cljs builds -- can any of Boot's jgit wrapper stuff help with that?

juhoteperi15:11:27

@pandeiro: describe or last-commit perhaps. If you need something else it should be easy to call jgit directly

pandeiro15:11:52

@juhoteperi: cheers, last-commit is perfect. describe outputs nil but i'm not sure what it's supposed to do.

juhoteperi15:11:37

@pandeiro: describe usually refers to previous tag so if you don't have any, it might not work

pandeiro15:11:56

@juhoteperi: OK thanks, appreciate it

juhoteperi15:11:45

git describe --help should offer comprehensive documentation 😉

martinklepsch18:11:42

There’s also +last-commit+ in bootlaces if you’ve already required that ns