Fork me on GitHub
#boot
<
2015-10-14
>
nberger16:10:04

I want to add a google closure compatible library to my project, I'm using boot-cljs and call it as (cljs :libs ["resources/js"]). The lib is libphonenumber, so I have files like resources/js/i18n/phonenumbers/phonenumberutil.js. I tried many variations of (ns ... (:require [i18n.phonenumbers])) (:import [i18n.phonenumbers PhoneNumberUtil]) but always get something like No such namespace: i18n.phonenumbers.PhoneNumberUtil, could not locate i18n/phon....cljc, or Closure namespace "i18n.phonenumbers.PhoneNumberUtil". I must be doing something wrong, any idea?

nberger16:10:57

perhaps I should put it under :compiler-options? Trying that now...

asolovyov16:10:23

any ideas what's the problem here?

[email protected] ~/dev/work/mkweb> boot aot -n mk.main
             clojure.lang.ExceptionInfo: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: boot.App.getClojureName()Ljava/lang/String;
    data: {:file
           "/var/folders/yh/786fldyj33g0g9zh09fqh0dr0000gn/T/boot.user2279948368857492500.clj",
           :line 51}
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: boot.App.getClojureName()Ljava/lang/String;
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: boot.App.getClojureName()Ljava/lang/String;
            java.lang.NoSuchMethodError: boot.App.getClojureName()Ljava/lang/String;
                  boot.pod/make-pod       pod.clj:  459
        boot.task.built-in/fn/fn/fn  built_in.clj:  547
clojure.core/binding-conveyor-fn/fn      core.clj: 1914
                                ...                    

nberger16:10:30

Cool, just saw it, thanks simple_smile

asolovyov16:10:08

that was fast 😉

juhoteperi16:10:27

Not the first time I see that error simple_smile Perhaps we should mention it somewhere...

juhoteperi16:10:03

Or even better, the binary should update itself

asolovyov16:10:15

that one is trickier, I guess simple_smile

juhoteperi16:10:03

No too hard, it's just a bash script so it's just matter or checking if curl or wget is available and calling it

juhoteperi16:10:09

Leiningen does the same

nberger16:10:01

thanks @juhoteperi, worked like a charm

juhoteperi16:10:49

@nberger: Another way is to package the library in a Jar with deps.cljs file, then Cljs compiler will find it automatically and you don't need to set compiler-options

nberger16:10:59

Cool. Perhaps that's a candidate for cljsjs?

asolovyov16:10:20

@juhoteperi: I wonder if you know what's happening with pom there ^

juhoteperi16:10:02

@nberger: If it's useful for others, sure. But there's nothing special about Cljsjs packages, you can as well just package it in your own repo and push to clojars yourself.

nberger16:10:45

Yes, sure, just that I think it might be useful for others. Ok, thanks, I'll see what I do, first thing is to tweak some details to use it in my app simple_smile

asolovyov16:10:35

ah, that's failing somewhere on a dependency...

juhoteperi16:10:57

@asolovyov: Haven't seen that error before

asolovyov16:10:06

that's something with my :exclusions, trying to find out what

asolovyov16:10:40

any example of using :exclusions and pom working? simple_smile

asolovyov18:10:28

if somebody changes my cljs version, what's the easiest way to determine who's that?

asolovyov18:10:40

like that:

[email protected] ~/dev/work/mkweb> boot dev                
Starting reload server on 
Writing boot_reload.cljs...
Warning: version conflict detected: org.clojure/clojurescript version changes from 1.7.145 to 0.0-3165
Writing boot_cljs_repl.cljs...

asolovyov18:10:15

piggieback, dammit

domkm20:10:39

Anyone used Optimus with Boot? I'm getting java.lang.UnsatisfiedLinkError: Native Library /private/var/folders/t2/kbjbdrwd5dzf_hh9gjfnz_b00000gn/T/libv8.dylib.clj-v8 already loaded in another classloader CC @magnars

chrisn21:10:43

does anyone have an example of deploying a snapshot to a private s3 repo?

chrisn21:10:12

Not getting the result that I expect.

chrisn21:10:22

Basically it doesn't look like the date is being appended correctly and a few other things.

chrisn21:10:52

Actually, it is the maven metadata that isn't getting updated correctly.

thosmos23:10:42

any idea how I can get a more understandable error than this: clojure.lang.ExceptionInfo: java.lang.ClassCastException data: {:file "/var/folders/00/1_302jq932lc58ljwn6rwrvr0000gn/T/boot.user304745065227089216.clj", :line 39} java.util.concurrent.ExecutionException: java.lang.ClassCastException java.lang.ClassCastException: Stack trace of root exception is empty; this is likely due to a JVM optimization that can be disabled with -XX:-OmitStackTraceInFastThrow.

alandipert23:10:41

@thosmos: first you can see more of the stack by doing export BOOT_JVM_OPTIONS=-XX:-OmitStackTraceInFastThrow

alandipert23:10:57

then to see what line 39 actually is, you can do boot -b

alandipert23:10:22

(assuming this is coming from your build.boot)

thosmos23:10:16

cool thanks that helped

alandipert23:10:28

you're not interoping with scala by any chance are you?

thosmos23:10:39

no, trying to port dnolen's om-next-demo to run in boot (https://github.com/swannodette/om-next-demo)

thosmos23:10:04

looks like the error had something to do with io.rkn.conformity/ensure-conforms