This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-11
Channels
- # alda (9)
- # beginners (28)
- # boot (94)
- # cider (21)
- # clojure (179)
- # clojure-android (4)
- # clojure-boston (2)
- # clojure-brasil (1)
- # clojure-denmark (1)
- # clojure-dev (194)
- # clojure-italy (1)
- # clojure-russia (8)
- # clojure-uk (1)
- # clojurescript (269)
- # clojurex (22)
- # clojutre (2)
- # cursive (4)
- # datomic (3)
- # devops (1)
- # events (7)
- # jobs (6)
- # ldnclj (30)
- # luminus (3)
- # off-topic (8)
- # reagent (3)
https://gist.github.com/cigitia/80f164635a1d03762269
I keep running into OutOfMemoryError
s when I run any task that uses boot-cljs, and I’m not sure why. My project is pretty tiny. Is there some sort of state I need to clear in between builds?
@cigitia: you appear to be on java 7, you might be able to alleviate these problems with JVM options - https://github.com/boot-clj/boot/wiki/JVM-Options#permgen-errors
a better way out is to upgrade to java 8 if you can
it's better in every way
@k-hen: glad to hear it's working - please don't hesitate to add your experiences/findings to the wiki
@alandipert: Ah, I see; thank you.
@alandipert: Installing and switching to Java 8 worked; thank you very much.
Hi all
Can't seem to get .cljc files into my jar
(output-files fileset)
returns empty set
I'm using 2.2.0 which supposedly works with .cljc https://github.com/boot-clj/boot/blob/master/CHANGES.md#220
actually it might be a problem not related to cljc files, my jars ignore clj files as well
@frankie: it sounds like you might want to use :resource-paths
instead of :source-paths
I'm even downloading example projects (like bootlaces) and running build-jar. All jars are empty
@frankie: hm, perplexing
one thing yuo can try is, in a directory without a build.boot, is boot -r some-directory-with-a-few-files jar
there you go, deleting .boot/cache solved it
drive it from the command line only with the simplest settings
ouch, weird! glad you figured it out... how did you know to do that?
didn't know, just tried a wild guess
I knew new versions introduced a cache and maybe that could be part of the problem
alandipert: I'm quite surprised I nonetheless have to use :resource-paths #{"src"}
for jars. Why is that necessary? Even bootlaces seems to do so https://github.com/adzerk-oss/bootlaces/blob/master/build.boot#L2
I assumed "src" is source-paths and "resource" is resource-paths and jars merges the two together
it's unfortunate how weird it seems coming from lein, but the first thing to point out is that resource-paths in boot is a completely different thing than in lein
so hard to name things 😦
Can you shed some light on this please?
sure. so first there is https://github.com/boot-clj/boot/wiki/Filesets which is worth a thorough read
but in a nutshell, the major difference between boot adn lein is that we have a value type for the filesystem
objects of this type are threaded through tasks like jar
for every build
this is the 'fileset'
and it is more or less an anonymous git repo
to the extent that files can be efficiently added and removed from it (without copying) because we leverage content-addressed storage and structural sharing
so that's "part 1" of what hte fileset does
"part 2" is, a build tool's job is to transform files from input into output
in e.g. git, there isn't a git command to do this because git isn't a build tool
what we needed in boot was a way to mark files as either inputs or outputs. some way for the programmer to tell us which files were only needed during the build vs. would show up in the finalr artifact
java files are a good example of source
files
as part of the build process they should not be outputted by default, only .class files should be
so, that's how we ended up at the idea that files in the fileset should have one of two roles, input or output
the primary API for deciding which role files start off with is resource-paths
vs source-paths
source = input, resource = output
does that make sense?
Gotcha, yes, "part 1" of fileset was very clear to me, now "part 2" is clear as well
I should have paid more attention to https://github.com/boot-clj/boot/wiki/Filesets#fileset-components
maybe we need a quick summary at the top of that page
So something like .less files would be in "source" while .css would be in "resource", correct?
correct
quick related question: if I have some boot build scripts that I want to move away from the build.boot file in a separate folder/file
what would be the best practice to include it in the build.boot file for the project?
they are scripts with tasks in them?
possibly
maybe the best thing to do is make a library and then require
from the top-levle build.boot
here is a .clj file with a task in it: https://github.com/alandipert/boot-jasmin/blob/master/src/alandipert/boot_jasmin.clj
note the :export-tasks
metadata on the namespace
if boot_jasmin is in the source/resource-paths of the build.boot, or in a jar brought in a dependency, we can bring it into the build.boot with https://github.com/alandipert/boot-jasmin/blob/master/example/build.boot#L6
makes sense, I was think of creating a folder called "scripts" and adding it as a resource-paths with some boot tasks in it
and then I guess I need to disj "scripts" before building the jar
yeah, i suppose the thing to realize .boot is for expedience, but when you start to develop a library of build functions, it's good to move them to .clj files and keep your build.boot small
that's how bootlaces started, then after it was in a separate file we published as a separate ilibrary we can use from all our build.boot
cool thanks for your help alandipert
no problem
doh! second time I accidentally forked this, lol. I need to stop using emacs key shortcuts in github 😊
https://github.com/upgradingdave/upgradingdave-boot/tree/master/src/boot/notify
homer says “woohoo!” for success and “doh!” for failures 😉
boot speak :theme “homer”
cool stuff!
@upgradingdave: love it!
protip: :theme "pillsbury"
the 'secret' theme
it was a tough decision whether to go with “mmm .. donuts” or “woohoo”
yeah, nice, I saw that in one of your examples and that’s what got me down the trail with the homer thing, haha
boot repl
starts like this
nREPL server started on port 60461 on host 127.0.0.1 -
REPL-y 0.3.5, nREPL 0.2.8
Clojure 1.7.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b26
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from : [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
boot.user=>
and cider-connect
does this…
nREPL: Establishing direct connection to localhost:60461 ...
nREPL: Direct connection established
nrepl-log-message: Wrong number of arguments: (1 . 1), 0
I’ve just updated to the latest cider and configured ~/.boot/profile.boot as per the wiki
boot.user=> boot.repl/*default-middleware*
#object[clojure.lang.Atom 0x1a9e7523 {:status :ready, :val [boot.from.io.aviso.nrepl/pretty-middleware cider.nrepl/cider-middleware]}]
did anyone ever figure out a way to get boot to download all a project's deps? it seems not possible yeah, because tasks can bring in their own deps?
related: can i call a task that isn't defined or required in build.boot from the command line?
e.g. boot -d alandipert/boot-jasmin jasmin -h
task authors have to make it possible by doing https://github.com/alandipert/boot-jasmin/blob/master/src/alandipert/boot_jasmin.clj#L2
and if a task (comp ...)'s other tasks, just calling task -h
won't fetch the deps of those comp'd tasks, right?
it might, it depends when the task gets deps
most tasks fire up pods in the 'constructor' function, so probably in most cases task -h does the trick
@boz: feels like more of an emacs debug thing, but not sure as i've never seen that before