This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-04
Channels
- # admin-announcements (33)
- # announcements (2)
- # beginners (10)
- # boot (200)
- # cider (25)
- # cljs-dev (13)
- # clojure (75)
- # clojure-canada (2)
- # clojure-czech (1)
- # clojure-dev (16)
- # clojure-japan (7)
- # clojure-russia (20)
- # clojurescript (206)
- # clr (1)
- # cursive (24)
- # datascript (1)
- # datomic (1)
- # editors (2)
- # hoplon (136)
- # ldnclj (54)
- # off-topic (9)
- # om (5)
- # onyx (8)
- # re-frame (66)
- # reagent (19)
- # yada (21)
Hey All. I'm trying to figure out how to use environ and boot together. I whipped up a repo that demonstrates what I expected to work with a test that fails. Could I get some help to make the test pass please? Cheers
Here's the repo: https://github.com/cddr/boot-env-test
Hm ok, so how do other folks specify different environment variables for different profiles? Or is that just a railsism that I haven't gotten over yet.
@micha: i had a go at a change log file: https://github.com/boot-clj/boot/pull/261/files
@micha: only included stuff since 2.1.2 for now... let me know if you want something like this, how to improve etc
regarding the links — doesn’t github figure this out itself usually?
or is that just in issues?
@ragge: linking to the changelog from the README is probably a good idea
@martinklepsch: yeah, I agree
hm. seems you really need to make proper links 😕
@martinklepsch: would be good to hear if a changelog file is the way to go at all
I think it’s great.
Readme is pretty full with stuff anyways.
also thought about a division similar to clojure, separating new features, enhancements and bugfixes... but seemed overkill for now
yeah, I was wondering if it might make sense to split between changes in boot and it’s built-in tasks
Changelog file is the way I think
but at the same time anything going forward is good. we don’t need to overdo it for a first version
@ragge: did micha add you to the boot org?
I use github releases for some projects but I think it's easier to just use a file
@martinklepsch: i don't think so, he asked about my id
@ragge: I think he asked with the intention to add you
@ragge added you
@martinklepsch: ok, cheers... was wondering if he reported me as a bot or something when nothing happened 😉
@martinklepsch: Added link to changes in readme. Train journey soon over, online again tomorrow...
@ragge: sweet
later then!
@ragge: thanks for the changelog! i’m pushing 2.2.0 today
I am trying to package Chart.js using boot-cljsjs, however, I am getting this error:
clojure.lang.ExceptionInfo: java.lang.AssertionError: Assert failed: No .ext.js file(s) found! (first externs)
I'm almost 100% sure it has to do with the file structure. I have pretty much duplicated what is on the README and the docs so I am not sure what I am doing wrong.. Here is the build.boot: https://gist.github.com/exload/7aa5fb202a59ce7b3cc1@kenny: do you have a file at resources/cljsjs/chart/common/chart.ext.js
?
@kenny: the packaging tasks complains because there is no externs file or it can’t find it
@martinklepsch: Why do I need to include that if it downloading it from GitHub?
@kenny: do you know what externs are and what they’re needed for?
@martinklepsch: Ah. That makes sense. Thank you!
@kenny: great 👍 let me know if you have more questions
@martinklepsch: Do you know how you would declare a constructor for a subtype (e.g Foo(a).Bar(b)
)?
@kenny: not sure myself but I think the firebase externs have something like that and are well-done
maybe that helps
Getting funky things when trying to run an uberjar:
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/IFn
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
at java.lang.Class.getMethod0(Class.java:3010)
at java.lang.Class.getMethod(Class.java:1776)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: clojure.lang.IFn
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
The reason for this seems to be passing :as-jars true
to the uber task 😕
trying to figure out how to change the server port with tenzing: https://github.com/martinklepsch/tenzing , I followed code down to a serve deftask in boot-http, but don't know where to go from there: https://github.com/pandeiro/boot-http/blob/master/src/pandeiro/boot_http.clj#L33 What am I missing?
@gtrak: you can set task options using task-options!
, e.g. (task-options! serve {:port 23423})
It’s in the README, although a bit further down: https://github.com/boot-clj/boot#configure-task-options
gtrak: boot.properties
is only meant to specify things that must be read before loading boot/clojure. so no
@gtrak: is there a reason you don’t want to put the task-options!
call into build.boot
?
i've just worked with boot for small scripts, this is my first foray into the more complex stuff
@alandipert: thanks for taking time for a release! just noticed my link to the change log in README.md is broken because incorrect case. happy for me to commit a fix to master? @martinklepsch added me to organization
https://github.com/boot-clj/boot/issues/264 — @ragge / @micha any quick ideas?
@martinklepsch: are you making a war file?
@micha: no, jar. see https://github.com/martinklepsch/minimal-uberjar-case/blob/master/build.boot
in a war file you can put jar files inside the war under WEB-INF/lib/
and the servlet container will add them to the class path
so you don't need to fully explode the dependencies to add them to the classpath as you do with uberjar
yeah makes sense
alan was working on a classloader solution that could produce an oberjar that used jars inside the uberjar
should I add some (war-only)
things to the task docstrings/option docs?
@martinklepsch: perhaps some mention, but it's not specific to WAR files really
I catched something that it’s faster because it doesn’t do the exploding and thought I could just use it, running straight into an open knife 😛
had to step out for a bit, working on release again
Cool, will try to come up with something
Error while extracting /Users/martin/.m2/repository/org/apache/tomcat/tomcat-juli/7.0.27/tomcat-juli-7.0.27.jar:META-INF/LICENSE: java.io.FileNotFoundException: /Users/martin/.boot/cache/tmp/Users/martin/projects/gridacus/solglas/nkq/dvwsf6/META-INF/LICENSE (Is a directory)
@martinklepsch: https://github.com/adzerk-oss/boot-ubermain is the experiment i did
getting plenty of these when not doing :as-jars true
— is the right way around that to exclude them by adding some thing like #\"(?i)^META-INF/LICENSE$\”
to excludes?
@martinklepsch: the thing it doesn’t do is provide a working boot runtime environment (nothing in boot.pod works if program launched via ubermain)
@martinklepsch: the plan in a future release is to open up some of the java setup methods in boot.App so that the boot runtime can be initialized by containers other than just the boot.sh cli
I like the usage notes
@martinklepsch: we should be handling that case i think, where you have both a file and a directory with the same path in a jar
@micha: I get that printed like a lot of times — all caused by one jar having a LICENSE
directory?
@micha “When using as-jars you need a special classloader like a servlet container that picks up the packaged jars and places them on the classpath” — sounds right?
I have no clue if I got the lingo right 😛
that sounds understandable
@micha: thanks for the explanation
@micha: i commented on https://github.com/boot-clj/boot/pull/239 what do you think?
@alandipert: looks great yes
ok pushing 2.2.0 🚬
making an uberjar without :as-jars
is amazingly slow 😵
hopefully it’s faster on CI
are you making a cli thing?
@alandipert: no. big server thing. will move to starting from boot soon but would like to get it working with plain uberjar first for now
a web app? i’m just curious if boot-ubermain is an option for you to try
certainly is an option
gave up at:
boot ubermain
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: option :subs must be of type {str str}
data: {:file
"/var/folders/lz/n73_ylvj7y33bdbm1hngnbv80000gn/T/boot.user9110688719877763746.clj",
:line 35}
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: option :subs must be of type {str str}
java.lang.IllegalArgumentException: option :subs must be of type {str str}
adzerk.boot-template/eval477/fn boot_template.clj: 16
...
adzerk.boot-ubermain/eval525/fn boot_ubermain.clj: 36
...
clojure.core/apply core.clj: 624
boot.user/eval735/fn/fn boot.user9110688719877763746.clj: 23
...
clojure.core/apply core.clj: 624
boot.core/construct-tasks core.clj: 678
...
clojure.core/apply core.clj: 624
boot.core/boot/fn core.clj: 706
clojure.core/binding-conveyor-fn/fn core.clj: 1910
…
should have filed an issue or asked, sorry i think you just need to supply the -m option to give it an entrypoint
like boot ubermain -m my.ns/-main
oh. does just the namespace not work?
now that explains why it’s called main-var
not main
@alandipert: trying ubermain again.
I've updated the boot nix package (that I'm probably the sole user of but whetever 👯): https://github.com/NixOS/nixpkgs/pull/9118
@ragge: actually just chatted with another nix user and discovered that you maintain that package!
the world is crazy small 😄
@ragge there’s going to be a nix conf in Berlin in November: http://conf.nixos.org/
@martinklepsch: yeah, saw that... i'd love to see nix get a bit more attention
@martinklepsch: clojure people should like it
@martinklepsch: are you using nix/nixos?
I’m on mac but I’m considering trying it out before I do a clean install (not that this would be necessary)
@alandipert: could it be that the ubermain doesn’t terminate when there’s an exception while calling the var I gave as main-var?
@martinklepsch: possible, but i would expect it to terminate - the java code doesn’t catch any exceptions, so i’d expect them to bubble up
i will test myself
trying again, maybe it was just my computer being slow at printing a prompt
when my main function throws an exception, i see java.lang.reflect.InvocationTargetException
(and jvm exit status is 1)
$ java -jar target/project.jar
2015-Aug-05 00:08:55 +0200 MacBook-Air.local INFO [dasession.api] - Dasession/datomic-store @ db-uri test
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at adzerk.MainSploder.main(MainSploder.java:88)
Caused by: java.lang.AssertionError: Assert failed: ENV not set in shell/env, aborting
(env :env)
at solglas.core$_main.doInvoke(core.clj:19)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.core$apply.invoke(core.clj:624)
at clojure.lang.Var.invoke(Var.java:383)
... 5 more
Nothing happening until I ^C
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: boot.App.getClojureName()Ljava/lang/String;
This is the error I should get when using an outdated boot.sh
with newer library jars right?
@martinklepsch: i'm currently getting the same error but i thought i had updated boot.sh... currently investigating
@ragge I also updated. I can do boot repl
outside of directories that have a boot.properties
file
@ragge what tasks are you running?
@martinklepsch: yep, same here
@martinklepsch: trying just boot
and boot repl
so far
i also have a custom task that uses make-pod
and that fails at https://github.com/boot-clj/boot/blob/master/boot/pod/src/boot/pod.clj#L458
yeah, repl works for me on dirs with boot.properties
and without so that does not seem to be the factor
stacktrace also comes from make-pod here
hey, yeah something is up
i think i might have uploaded the wrong boot.sh
what are your boot.sh md5s please?
e0b3ef41bffbedb918e7057a54e1e2ee
@alandipert: I built from master like half an hour ago and had that exception before I updated the boot executable so yeah
sounds as if that could be the cause
ok weird the one i built is ebe693b4f2283487d8ef6134e2e16485
and the one on github is definitely e0b3ef41bffbedb918e7057a54e1e2ee
so either i chose the wrong one or the upload borked somehow
err, (boot.pod/make-pod {})
fails with java.lang.NoSuchMethodError: boot.App.getClojureName()Ljava/lang/String;
i think i uploaded the wrong boot.sh 😦
d514cd596b38f5f005488b0e240f75eb — that’s what I get when building from master
can you please try with that one and lemme know if works? if does, suspicion confirmed
@martinklepsch: our md5s likely differ because you compiled with java 8, we compile with javac 7 for releases
@alandipert: gotcha
has been said a million times but CircleCI’s ssh access is just great.
@alandipert: i get the same md5 for the boot.sh you just uploaded
ok, i updated the release page with a new boot.sh
should be the correct one - please try
sorry for all this! thanks for the help fixing
let’s just pretend that this never happened and that release binaries are immutable
drumroll
works!
sweet!
immutable-ish
lol — wanted to paste some champagne gif and found this: http://media.giphy.com/media/v65N3d8y7Dj9e/giphy.gif
i like how he holds it up at the end anyway
@alandipert: https://github.com/boot-clj/boot/issues/266 — uploaded new exe as well?
commented without reading the thing 😏
@martinklepsch: yeah i’m confident that exe is new also
perfect