This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-20
Channels
- # beginners (35)
- # boot (81)
- # braveandtrue (7)
- # cider (74)
- # cljs-dev (52)
- # cljsrn (5)
- # clojure (114)
- # clojure-austin (1)
- # clojure-belgium (3)
- # clojure-brasil (8)
- # clojure-czech (7)
- # clojure-greece (18)
- # clojure-ireland (1)
- # clojure-russia (67)
- # clojure-uk (11)
- # clojurescript (52)
- # core-async (5)
- # core-matrix (3)
- # cursive (13)
- # data-science (3)
- # datomic (8)
- # emacs (80)
- # events (2)
- # hoplon (8)
- # immutant (7)
- # jobs-discuss (3)
- # juxt (25)
- # ldnproclodo (21)
- # leiningen (27)
- # mount (24)
- # off-topic (6)
- # om (23)
- # onyx (48)
- # parinfer (1)
- # proton (4)
- # re-frame (41)
- # reagent (9)
- # spacemacs (8)
- # untangled (122)
@hlolli: you can do boot -V > boot.properties
in your project directory and and add the jvm option to BOOT_JVM_OPTIONS
(that's also how you'd pin boot/clojure versions and other boot env vars on a per-project basis)
@hlolli: another decent option is to make a pom for that jar and install it to local mvn cache
I get a lot of these:
Caused by: java.io.FileNotFoundException: Could not locate boot/core__init.class or boot/core.clj on classpath.
at clojure.lang.RT.load(RT.java:456)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:551)
at user$eval3$loading__5569__auto____4.invoke(user.clj:1)
at user$eval3.invokeStatic(user.clj:1)
at user$eval3.invoke(user.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
... 14 more
@tolitius: found that I needed to add boot to the dependencies vector as per your example project
@alandipert: thanks for pointing out making a POM. I've had no success so far using BOOT_JVM_OPTIONS (or jvm options in lein for same problem for that matter).
Anybody seen this message before when compiling ClojureScript:
WARNING: Unknown compiler option ':warning-handlers’.
@slotkenov: it's just a harmless warning introduced recently in the cljs compiler
@jethroksy: boot-check 0.1.2-SNAPSHOT
already have that dep. I understand this might be not a desired approach: https://github.com/tolitius/boot-check/issues/2 but it would require quite a rework of the lib ( pull request is very welcome :) )
Hey, I’m trying to use the boot-beanstalk
task (https://github.com/adzerk-oss/boot-beanstalk) but I keep running into errors. Has anyone had any success using that task or am I wasting my time? I’m new to boot so I’m having a hard time deciphering the errors...
@kahlin: not using it myself but maybe people have ideas if you paste the error
@kahlin: what kind of errors are you getting?
also i can share working build.boots for our beanstalk apps if that would be helpful
I get this:
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: No implementation of method: :file of protocol: #'boot.tmpdir/ITmpFile found for class: nil
data: {:file
"/var/folders/8k/x4zdr9916416yjv7_b9z9rwh0000gn/T/boot.user5014082652765978733.clj",
:line 53}
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No implementation of method: :file of protocol: #'boot.tmpdir/ITmpFile found for class: nil
java.lang.IllegalArgumentException: No implementation of method: :file of protocol: #'boot.tmpdir/ITmpFile found for class: nil
Yes, working build.boots would be very helpful!can you paste your build.boot?
also what kind of beanstalk is it, docker or war?
This is more or less copied from the readme:
(deftask build-prod
[]
(comp (aot) (web) (uber) (war) (target)))
(deftask deploy-tomcat
"Deploy application to AWS Tomcat environment"
[]
(task-options!
beanstalk {:stack-name "64bit Amazon Linux 2016.03 v2.1.0 running Tomcat 8 Java 8"})
identity)
(task-options!
pom {:project 'wisall
:version "0.1.0"}
jar {:main 'wisall.core
:file "wisall.jar"}
aot {:all true}
web {:serve 'wisall.core/app}
serve {:port 3000
:handler 'wisall.core/app}
beanstalk {:name "wisall"
:version "0.1.0-SNAPSHOT"
:description "wisall"
:access-key (System/getenv "AWS_ACCESS_KEY")
:secret-key (System/getenv "AWS_SECRET_KEY")
:beanstalk-envs [{:name "wisall-prod" :cname-prefix "wisall"}
{:name "wisall-stage" :cname-prefix "wisall-stage"}]})
hm nothing sticks out
although it looks like maybe you need the :env
key?
http://bit.ly/1XJ6D5W is a working one
there we use the eb-war
task which handles .ebextensions appropriately by putting them in the root of the jar (instead of at WEB-inf/classes)
there's a lot of extra nonsense in for local dev and sending to slack, the tasks of interest are build
and deploy
ooh i think i see
i believe the :file
argument to war is a fileset-relative path
it gets the war to deploy from the fileset, not the target directory
where the fileset is that anonymous git-repo like object that is passed between tasks
maybe try boot build-prod beanstalk --deploy --file project.war
and then you don't need (target)
in build-prod
Hmm, I see. I’ve tried it with just project.war
rather than target/project.war
but that didn’t help.
same exact error?
also, after boot build-prod
do you indeed see a target/project.war
?
I can’t recall if it was the same exact error, but it was similar. Right now I’ve done something to make things not work at all unfortunately. 😕 I think it was the exact same error.
Yup, target/project.war
is there. If I upload it manually to beanstalk everything works, so the build part is working as expected.
How come I don’t need (target)
if I do —file project.war
? I’m still trying to wrap my head around the filesets.
that's exactly right
Ah, I see. So the boot tasks operates on the filesets which is an abstraction of the filesystem?
also correct
a java object is passed between tasks that represents an anonymous filesystem
under the hood it does content-based addressing and structural sharing via hardlinks to be efficient
one of the main ideas with boot is that build tools get tricky when parts of a build need to coordinate around a single mutable place, such as a known directory on disk
which usually necessitates a clean
operation
so to be able to program builds, we need the filesystem to be first class and anonymous
which is the fileset thing
I see. I’m starting to understand (I think).
Still, no luck with my beanstalk task. At least now I know it should be working. I’ll investigate your build.boot
more closely and try to understand the differences.
cool. yeah you might try incrementally moving parts from it to your own
we are currently moving away from beanstalk
but we'll continue to maintain the task
mostly because it's really hard to debug... eb apps are supported by tons of auto-generated resources that are hard to find and understand as a whole, which you need to do if you have problems
also you can't make any changes during deploys, so if the deploy goes bad there's nothing you can do to mitigate downtime
and then for worker tier, your workers have lots of problems if jobs take more than a few minutes, since you hit all the hardcoded timeouts in the worker tier web stack
micha invented an alternative that's built from simpler parts and has most of the same affordances
basically we use a few shell scripts and orient around ASGs
i think it's still a great choice for many things though, especially if you only have a handful of eb apps
but we're approaching a dozen and it's worth it to us to start building out our own infrastructure for these kinds of things
I see. I’m building a fairly simple webapp so I don’t anticipate running into “hard” problems like that. And some downtime won’t be critical either so I think it’ll be a good fit for what I’m doing.
With sift —include project.war
I get another error (it now complains about missing environment
which makes sense).
no problem! happy computing 💻
Anyone know how to get rid of what looks like unix colorizing escape characters from boot output on Windows? ←[m←[1mò
I tried BOOT_COLOR=no. That turns some lines off, but others persist.
This might have something to do with Hoplon
. When BOOT_COLOR=no
only Hoplon
related compiler output has the escape chars.
@symbit: not sure why that would happen, maybe look around boot-hoplon
@alandipert: Will take a look. with BOOT_COLOR=no
←[1mCompiling Hoplon pages... with BOOT_COLOR=yes
←[m←[1mCompiling Hoplon pages...
definitely weird
@alandipert: about beanstalk have you seen http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.CNAMESwap.html ? They just announced blue/green deploys.
Something I keep running into with Boot’s pods: if I run a process in a pod, that does some sort of scheduled cleanup, it often ends up running in the pod after the classloader has been cleared out — so you get these bizarre NoClassDefFound exceptions after a task has completed but when Boot is running other tasks.
A concrete example: I’m using Carmine to talk to Redis. It sets up cache eviction tasks that run on a Java Timer… and the task finishes and the pod is cleaned up … and then the timer fires and the eviction task fails because the Apache Commons Pool library got unloaded / cleaned up.
Any thoughts on how to avoid this sort of thing? It seems at least potentially a little dangerous...