This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-07
Channels
- # admin-announcements (5)
- # aws (2)
- # boot (313)
- # cider (69)
- # cljsfiddle (18)
- # cljsrn (17)
- # clojars (6)
- # clojure (121)
- # clojure-austin (4)
- # clojure-bangladesh (4)
- # clojure-colombia (2)
- # clojure-dusseldorf (17)
- # clojure-japan (1)
- # clojure-russia (65)
- # clojure-sg (4)
- # clojurescript (94)
- # community-development (6)
- # core-matrix (2)
- # cursive (2)
- # data-science (6)
- # datomic (28)
- # hoplon (4)
- # jobs (1)
- # jobs-discuss (1)
- # keechma (15)
- # ldnclj (2)
- # off-topic (6)
- # om (140)
- # om-next (1)
- # onyx (47)
- # parinfer (11)
- # re-frame (13)
- # reagent (4)
- # spacemacs (7)
- # specter (7)
- # yada (18)
Is [this](https://github.com/upworthy/heroku-buildpack-boot) the recommended heroku buildpack for boot? When using it and also using the explicit target
task, builds fail with the following:
remote: -----> Clojure (Boot) app detected
remote: -----> Installing OpenJDK 1.8...done
remote: -----> Using cached version of boot
remote: -----> Copying boot... done
remote: -----> Running: boot build
remote: 2016-03-07 04:02:17.490:INFO::main: Logging initialized @9187ms
remote: clojure.lang.ExceptionInfo: Unable to resolve var: target in this context
remote: data: {:file "/tmp/boot.user6304407250630311101.clj", :line 9}
remote: java.lang.RuntimeException: Unable to resolve var: target in this context
remote: ...
remote: boot.main/-main/fn main.clj: 161
remote: boot.main/-main main.clj: 161
remote: ...
remote: boot.App.runBoot App.java: 242
remote: boot.App.main App.java: 356
remote:
remote: ! Push rejected, failed to compile Clojure (Boot) app
remote:
I was just asking about running Boot on Heroku the other day! Thank you!
Hmm, and, yeah, it does it by downloading Boot as part of the run/setup stuff... Fair enough.
Sure :) I was pointed to this buildpack from someone else on this channel as well. Still don’t know why the explicit target directory causes the build to fail, and how fix it :p
Hi folks. Thinking about the way tmp-dir!
etc. are used relative to the Fileset concept this weekend it occurred to me that Boot could use another abstraction: workspaces. So I wrote a little blog article about it: http://blog.mobileink.com/2016/03/workspaces-boots-missing-abstraction.html
nice a good thing to think about. I'd be wary of adding a limiting (and ultimately a leaky) abstraction hiding the filesystem, but the concept of a workspace seems useful
yeah, if you really wanted to work out a complete ws abstraction you'd definitely want to do it as a library with boot as the backing engine.
hard to see how far to go with abstracting the entire fs api but it would be interesting
one note is that add-resource
doesn't really have any relation to tmp-dir!
-- add-resource
just adds the contents of any directory to the fileset
@micah: so you can add anything from the filesystem directly to the fileset? I guess I was under the impression that you have to use a temp dir under boot's control. but maybe that's just a Best Practice for stuff you create? it does make sense to allow any dir - you could have a parameter that points to some dir outside of your project tree.
just a content-addressed bucket containing any file that could exist in the "tree" or working set
that ensures that any snapshot ever made contains enough information to recreate the working tree
ok, i see what you're saying. its more like add-foo takes a snapshot and puts that in the blobstore, not that the blobstore is a snapshot
git is more efficient because it stores blobs at a more granular level, chunks of files rather than whole files
for each file it computes the blob id, which would be b1946ac92492d2347c6235b4d2611184.1457367675
or something like that
then if there is no blob file with that id already (i.e. no file in blob store directory with that name)
when it returns a new fileset object, the fileset object will have like {:tree {"foo.txt" "b1946ac92492d2347c6235b4d2611184.1457367675"}}
basically
that pretty much matches what my mental model is except i didn't know about the blob id stuff. but that's all implementation detail, i think. for the noob, i think the key point is that doing add-*
on a dir (which may or may not be a "workspace") means that boot stores the state of the dir at that point in time, using its implementation mechanism (which happens to be a blobstore, but could be sth else) and the new Fileset reflects that state. Effectively taking a "snapshot" of it and squirreling it away. Using "snapshot" loosely, to mean "capture state".
so you could add-resource
a dir in the FS and then immediately delete it, but that would not effect boot - the blobstore;Fileset would still have it as it was when you did add-resource
?
actually that would be a nice little experiment for newcomers: run a task that adds a dir to the fileset, run (wait)
for 5-10 secs, go delete the dir, then watch the pipeline work anyway.
related question: you could also use any dir as a workspace, right? you don't have to use tmp-dir!
, you could create your own workspace dir anywhere and use it to make stuff to add to the fileset. so `tmp-dir! is just a convenience?
and just to be clear: the dir create by tmp-dir!
is just a dir, no immutability. it should be safe, since only boot knows its there, but you can add/change/delete at will
the only reason there is a function for it in boot core is because the lifetime of temp files is a little weird when you're building stuff
i wonder if having immutable workspaces would add enough value to justify the cost of dev
and this is a PITA because if there is a crash the temp file is deleted when the JVM exits
with boot if you use tmp-dir! you get a temp directory whose contents will not be deleted when the JVM exits, so you can still look at those files to debug
@micha a question, if I am in a boot in boot session, and call add-jar
, exploding the content, where is this content going
a better question is, do I have tmp folder for boot in boot as well?
because I sporadically receive exception when I execute tests in parallel that are importing/copying stuff over
maybe it is on my side but I wanted to ask first, I should be able to delete and add stuff isolating every boot in boot session right?
well no delete sorry, I will show you
it is a simple add-jar
but throws from time to time when in parallel: https://github.com/arichiardi/boot/commit/1dc56241ae0009cb04130d732f295c2e8da1949a
but again, I just wanted to be sure to have the same kind of feature in boot-in-boot
hey all, i made a sample project showing how I do full-stack (clj + cljs) projects using boot. let me know if you have any suggested improvements: https://github.com/oakes/full-stack-boot-example
hello everyone!
I’m having strange problems when installing boot on my macbook…
after installing via brew install boot-clj
and running boot, either by calling boot -v
or boot -h
first run goes fetch
which seems normal, but when called again (also by typing boot -h
) it will attempt to download the jar again from github and then fail with the following error: clojure.lang.ExceptionInfo: Could not locate boot/task/built_in__init.class or boot/task/built_in.clj on classpath.
any ideas? I’m new to clojure ^^ tried adding ~/.m2
to the path or even ~/.boot
… but no luck so far
@vectorsize: does boot -V
work?
#
#Mon Mar 07 19:59:51 CET 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.5.5
also tried manually installing v2.6.0-SNAPSHOT and fiddle around inside ~/.boot
but nada
try rm -rf ~/.boot
(unless your profile.boot
is important to you)
its not important for now, didnt get anything done so far haha
tried from your earlier comment here rm -rf ~/.boot/cache ~/.boot/boot.properties
without any luck actually, just goes trhough the same process again
try wiping the complete folder, not just the ~/.boot/cache
dir
aghh same with rm -rf ~/.boot
gonna try fulll path
full path? dont delete your home dir! 😉
haha not today, not in that kind of mood 😉
damn it same
which boot
is /usr/local/bin/boot
@micha
mm shouldnt this be Cellar
or similar if its the homebrew?
I have it via homebrew, path is the same
oh yes its a symlink to /usr/local/Cellar/boot-clj/2.5.2/bin/boot
next idea would be checking checksums of jars
ok that sounds like something I would never do haha
u mean check if the jars being called are the good ones @martinklepsch ?
it's unlikely they're wrong but there have been stange things with githubs release caching/downloads before
and I don't have any better ideas ¯\(ツ)/¯
I can also go download them manually and replace them
yeah I know this is kinda strange…
ok gonna try more things, thanks a lot for the suggestions @martinklepsch and @micha lemme know if u come up with something!
I’ll keep u posted if I find what was wrong
btw after installing twice it always gets stuck with Could not locate boot/aether__init.class or boot/aether.clj on classpath.
dont know if it’s something obvious with path that Im missing
is it
thats what I thought
i’m afraid it’s the same…
was operating from ~
before but same from a newly created dir
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
damn it i was hoping it didnt haha
yes it does and tried adding ~/.boot/cache/lib/2.5.5/
to the path without luck also
also there
grrrr Could not locate boot/aether__init.class or boot/aether.clj on classpath.
no md5sum
in my machine hold on
md5 `which boot`
cool thanks @martinklepsch !
MD5 (/usr/local/bin/boot) = 123f9f5658fdf1e967ba08c502c56a82
hahaha this is the crazy bug
MD5 (/Volumes/Home/.boot/cache/bin/2.5.5/boot.jar) = 569b593d4d614ce98c114bdcc77e092d
MD5 (/Volumes/Home/.boot/cache/lib/2.5.5/aether.uber.jar) = 4de2768cc44c42124d4c09a91158f083
lot of shit in there haha
hahaha unfortunately not
I tired another terminal too @mobileink
but lets redo it
vectorsize: ~
→ rm -rf /Volumes/Home/.boot
vectorsize: ~
→ boot
Downloading ...
Running for the first time, BOOT_VERSION not set: updating to latest.
#
#Mon Mar 07 20:30:42 CET 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_VERSION=2.5.5
BOOT_CLOJURE_VERSION=1.7.0
vectorsize: ~
→ boot
Downloading ...
clojure.lang.ExceptionInfo: Could not locate boot/task/built_in__init.class or boot/task/built_in.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
data: {:file
"/var/folders/xt/bp8zrtt9245gsdg0wd5m10s00000gn/T/boot.user4245230599665512710.clj",
:line 1}
java.io.FileNotFoundException: Could not locate boot/task/built_in__init.class or boot/task/built_in.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
...
clojure.core/load/fn core.clj: 5866
clojure.core/load core.clj: 5865
...
clojure.core/load-one core.clj: 5671
clojure.core/load-lib/fn core.clj: 5711
clojure.core/load-lib core.clj: 5710
...
clojure.core/apply core.clj: 632
clojure.core/load-libs core.clj: 5749
...
clojure.core/apply core.clj: 634
clojure.core/use core.clj: 5843
...
boot.user/eval55/loading--auto-- boot.user4245230599665512710.clj: 1
boot.user/eval55 boot.user4245230599665512710.clj: 1
...
boot.main/-main/fn main.clj: 192
boot.main/-main main.clj: 192
...
boot.App.runBoot App.java: 390
boot.App.main App.java: 467
...
Boot.main Boot.java: 258
what do you guys mean by cp
?
osx yes @mobileink and here’s the version:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
“why is it downloading versin 2.5.2 especially” didnt even realize that version missmatch
but then it says it’s the v2.5.5 when called
here’s my path in case it helps:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/usr/local/bin:
/usr/X11/bin:
/Volumes/Home/.nvm/v0.11.9/bin:
/opt/X11/bin:
/usr/local/MacGPG2/bin:
/usr/local/Cellar/python3/3.4.3_2/bin:
/usr/local/rvm/bin:
/Volumes/Home/.rvm/bin:
/usr/local/bin/:
/usr/local/git/bin:
/Volumes/Home/.m2:
/Volumes/Home/.boot/lib/2.6.0-SNAPSHOT:
/usr/local/Cellar/pcre/8.32/bin:
/Volumes/Home/Dropbox/Documents/unix/scripts:
/Volumes/Home/pear/bin:
/Applications/Postgres.app/Contents/Versions/9.3/bin:
/usr/local/go/bin:
/Volumes/Home/Dev/gocode/bin:
/usr/local/sbin:
/usr/local/heroku/bin:
/Applications/Postgres.app/Contents/Versions/9.4/bin:
/Volumes/Home/node_modules/.bin:
/usr/local/share/npm/bin:
/Volumes/Home/Library/Developer/SDKs/depot_tools:
/Applications/VirtualBox.app/Contents/MacOS/:
/usr/local/bin/depot_tools:
/Applications/Neo4j Community Edition.app/Contents/Resources/app/bin:
/Applications/Neo4j Community Edition.app/Contents/Resources/app/jre/bin
I upgraded homebrew and reinstalled boot from scratch also
the files are the same yes…
should I install via the bash instead
nop to BOOT_JVM_OPTIONS
nothing is printed
it's weird because if you download boot.sh you will just get the same thing you already have
homebrew has a bunch of security stuff that can fail silently. are you running it sudo?
nop homebrew doesnt allow sudo
im gonna uninstall the homebrew version and try the bash
never tried with su actually
so, no homebre anymore involved
deleted ~/.boot
downloaded boot.sh from github
copied it to /usr/local/bin
as boot
cmod
it to 755
called it
same procedure, downloads 2.5.2
on second invocation downloads 2.5.5
and fails Could not locate boot/task/built_in__init.class or boot/task/built_in.clj on classpath.
etc
echo $CLASSPATH doesnt print anything its all in $PATH for me, does it have to be $CLASSPATH? :O
got worried for a sec that the mistake was that lol
$PATH is:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/usr/local/bin:
/usr/X11/bin:
/Volumes/Home/.nvm/v0.11.9/bin:
/opt/X11/bin:
/usr/local/MacGPG2/bin:
/usr/local/Cellar/python3/3.4.3_2/bin:
/usr/local/rvm/bin:
/Volumes/Home/.rvm/bin:
/usr/local/bin/:
/usr/local/git/bin:
/Volumes/Home/.m2:
/Volumes/Home/.boot/lib/2.6.0-SNAPSHOT:
/usr/local/Cellar/pcre/8.32/bin:
/Volumes/Home/Dropbox/Documents/unix/scripts:
/Volumes/Home/pear/bin:
/Applications/Postgres.app/Contents/Versions/9.3/bin:
/usr/local/go/bin:
/Volumes/Home/Dev/gocode/bin:
/usr/local/sbin:
/usr/local/heroku/bin:
/Applications/Postgres.app/Contents/Versions/9.4/bin:
/Volumes/Home/node_modules/.bin:
/usr/local/share/npm/bin:
/Volumes/Home/Library/Developer/SDKs/depot_tools:
/Applications/VirtualBox.app/Contents/MacOS/:
/usr/local/bin/depot_tools:
/Applications/Neo4j Community Edition.app/Contents/Resources/app/bin:
/Applications/Neo4j Community Edition.app/Contents/Resources/app/jre/bin
@mobileink:the crap is all mine I think 'haha
my only guess right now is if this is because my home is another drive, which shouldnt be a problem but who knows
my ~
is /Volumes/Home
I managed in my other computer which has a simple ~
setup and it works just fine
BOOT_LOCAL_REPO=/Volumes/Home/.m2 boot -h
is installing stuff...
still dling stuff #fingerscrossed
ok finished installing now I call it and nothing…. no error no nothing
tried both
BOOT_LOCAL_REPO=/Volumes/Home/.m2 boot -h
and boot -h
and returns without output
ok yes I can do that
well it's actually failling when it does load-file
on the generated boot.user
namespace
allright then!! thanks a lot @micha and @mobileink I’m gonna take a break now I think been trying for 3 hours now, just to have a clojurescript hello world running lol
memory failing but couldn't that cause problems when you have stuff on different vols?
yeah it’s not the first time something strange happens and I wonder if my home setup could be the problem
@vectorsize troublemaker! ;)
haha sorry
like it was able to use all the boot namespaces that were needed to bootstrap maven and get boot.main loaded
honestly I don’t know enough to make any smart comments at this point
there is a guest user
doest seem actif now
I have another system in an external drive also could that be conflicting?
gonna eject and try
yeah now all tests are from that one
okey yes I will try that next time
sounds easier than recompiling
do you want me to open an issue @micha with a description of it as it is right now?
just saw ur one of the ones merging PRs in the repo
probably the author? sorry haha
ok I will do that
guess: there's a hard link in there that only gets used in just the right situation. talking out my hat.
so the download works and put some stuff in one volume and some in another. when you run boot there's a hard link that chokes maybe.
…sounds logic @mobileink
ok issue issued 😄
thanks again everyone for your help
“where is /var?” sorry how do you mean?
i see what you mean
yes it’s in the main drive
at least I think so @mobileink
yes main drive
Machintosh HD/private/var
so not the same as /Volumes/Home
could I try a quick patch with a symlink @mobileink ?
not sure how to go about it
if I symlink /var
in my home drive perhaps
or should it be the other way around rather
gosh, not sure. been a while since I monkeyed with this sort of stuff. boot is looking for /var, so ~/var would prolly not help.
no thats what I though
is /var/folders/xt/bp8zrtt9245gsdg0wd5m10s00000gn/T/boot.user5389103512016161084.clj
a tmp file?
yes it is
you'd have have to remap /var to the other vol, and I forget how to do that at the moment.
yeah I don’t wanna break the rest of stuff
ok off to get something to eat now, ‘night yall
haha won’t try that tonight, who’s the trouble maker now 😛