This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-02
Channels
- # admin-announcements (9)
- # alda (21)
- # announcements (1)
- # beginners (68)
- # boot (241)
- # braid-chat (18)
- # cider (32)
- # cljs-dev (4)
- # cljsrn (11)
- # clojure (60)
- # clojure-dusseldorf (1)
- # clojure-germany (1)
- # clojure-poland (212)
- # clojure-russia (64)
- # clojure-sg (10)
- # clojurescript (212)
- # core-async (1)
- # css (14)
- # datomic (1)
- # emacs (9)
- # funcool (2)
- # hoplon (18)
- # jobs (1)
- # ldnclj (1)
- # lein-figwheel (5)
- # leiningen (3)
- # om (190)
- # onyx (46)
- # parinfer (13)
- # proton (3)
- # re-frame (7)
- # reagent (10)
- # ring-swagger (2)
- # slack-help (3)
- # specter (1)
- # yada (31)
Our build.boot
file is over 750 lines now… and as of today we no longer need Ant for our regular build/test process! Yay!
We still have some old Selenium (Selenese) tests that are run via Ant, and our deployment process still leans heavily on Ant’s tar/untar stuff and ability to delete whole swathes of files, but we’re working on that.
Things our Boot build script does includes: unpacking test files, running Grunt(!), tearing down and rebuilding various databases, running CFML (ColdFusion) scripts via HTTP(!), and the normal stuff that you’d expect (running tests, creating JAR files etc).
We’re also starting to use pods more to help isolate things from each other...
macro changed not recompiler. platform: Mac OS X
boot -v
#
#Wed Mar 02 10:52:27 HKT 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.5.5
[adzerk/boot-cljs "1.7.228-1" :scope "test"]
@seancorfield: that's great do you guys use uberjars at all?
@tolitius: No, not at present. We probably will as we move more of our processes to Docker.
Our biggest pain point so far has been boot-test
so expect some tickets coming your way @micha et al
@seancorfield: : your build.boot sounds amazing, congrats
Does someone know if webjars provides 1) an API to initiate builds 2) a way to build all dependencies of a project?
@martinklepsch: It builds dependencies automatically and there is undocumented endpoint to initiate build (check network log after triggering build from browser)
@juhoteperi: thanks, should dependencies show up in the "Deployed NPM webjars" section then?
@juhoteperi: I deployed basscss
but none of it's deps (https://github.com/basscss/basscss/blob/master/package.json#L17) are listed there...
@escherize: https://clojurians.slack.com/archives/boot/p1456896587003268 you can use clojure.java.sh
... That's what we do.
@seancorfield: Thanks buddy!
Boot also comes with it's own dosh
somewhere
I had a feeling it might @martinklepsch but it would have take longer to find that than to write what I needed I suspect! 😸
I’m using Cursive for dev, and I’m unsure about browser nrepl usage with the cljs nREPL that is started by boot. When I run boot dev
, it does (comp (serve) (watch) (cljs-repl) (reload) (speak) (cljs))
, which compiles my cljs and starts a repl. When I connect from Cursive, should I run (start-repl)
? It seems like this would start two cljs compilation steps. /n00b
I could be wrong but I don't think it starts 2 compilation steps. rather (start-repl)
jacks into the brepl, instead of a clojure repl into the jvm process running the boottask.
hey! just gave my boot talk, and a few questions popped up that I couldn’t really answer properly.
1. Given that boot is turing complete, does boot do anything to ensure that nothing malicious is being done to the system?
1. no (at least, nothing more than what the JVM does)
what do you mean by get all dependencies? like list all the dependencies that have been loaded?
got it
so there isn't a way to know definitively what dependencies are loaded
you could survey all the pods and look, but as the program runs more could be added since this part is dynamic
however
the standard way for JVM applications to display dependencies is via pom
and boot supports/condones creating and sharing .pom files describing what libs built with boot need to run
kinda
take boot-template for example
it uses stringtemplate in a pod to do string substitution at "build time"
i use it for filling out xml etc. before things get uberjar'd
however the application i built doesn't depend on stringtemplate
so i don't really care if the stringtemplate dep i used incindentally at build-time is compromised (that much)
so the short answer is no, boot isn't amenable to any static analysis of the deps at all
but the long and nuanced answer is it can be done by convention, using the pom
task, and depending on what the application author's concerns are
what is their startup btw?
one of the main hurdles they mentioned was converting their giant project.clj file into build.boot
i started a startup at one time to do the same thing and decided not to lol
definitely one of the hurdles of programming is finding the time to program, i battle with this daily 😼
the more you do, the more bugs you find and improvement ideas you have
it sux
@jethroksy: in boot-bowdlerize I have a show
task that acts like builtin show
, except it's driven by a config file. The latter contains info about deps that are used by other tasks, and show
extracts the coordinates and uses aether/dep-tree
to show dependencies that are used during build but not at runtime. Would something like that help?
@mobileink: right, but you’d have to specify all the deps in a file
the guy wants to parse build.boot and say, hey, I have these deps, are there secure?
Also, I have put out an early version of a.. cljs fiddle, and im going to spam you now - im sorry.
definitely boot pom
is the 99% solution i think
since most people don't use pods in their app at runtime
i do sometimes, so to play with their thing i'd make a file with all the deps i'd want audited... and create a pom from it for them with a task
then in my build.boot and where i make my pods i'd use the deps from this file
yeah, that's why i wanted the ability to show build-time v. runtime deps. divide and conquer. plus that way the build-time only deps are not included in the build.
@escherize: the cljs fiddle awesome!
no, just tasks that need them. originally I make them .clj files with defs
, then I saw the light so I'm switching to edn files.
@escherize: feature request, add javelin 😃
i have wanted to make something like this for hoplon for a long time
@jethroksy: my use case was fetching webjars deps containing web resources and then unpacking them into resources/public/
. once that's done they're not needed at runtime. having a show
task for them shows any transitive deps and also allows multiple edn files - it just saves you the trouble of going through a bunch of files to see what deps were used during build.
i wonder about a boot shim
that hooks into boot at the maven/aether level and disallows downloading flagged jars
or maybe gives you a hook to log something
then their service could tell you things about deps dynamically
yeah, edn files might not work for a general tool, you'd have to be able to deal with anything
the cljsfiddle thing is quite slow to load, no illusuion, @jethroksy
I guess if people expect to get stuff out of their service, then they should put in some effort to specify their deps
http://projars.com/ is me and micha's thing that's on a hiatus, but i'd be curious to hear if anyone's interested in it
the idea there was to do the analysis at the maven server level. so you'd point your boot projects to our private mirror, and then you'd have visibility into the deps your apps are bringing in across build/run times
sounds like the real problem is general: how to convert a leiningen project map (or similar for other build systems) into boot stuff. i'm inclined to think step one is to identify exactly when each dep is used, build time or run time, for dev, test, prod, etc. and then keep them segregated somehow. i have some projects i'm planning to convert so i'll soon find out.
this is kinda sorta related to supporting build "flavors" and "types" as used in the Android gradle plugin - I'm staring at it and thinking boot would make things so much simple.
i’m sure some sort of static analyses can be done to convert project.clj files to build.boot
intimacy with build.boot is one of the key factors that bring clarity to the project
@alandipert: how would it work? is the idea that it could tell you what pods you have and what their deps are?
I wanted to release my slack client as a library, but there’s more than enough out there
dilution of the clojure ecosystem is a problem that both node and clojure are struggling with imo
I'm trying to figure out how I can parse a fileset, where the user says "I have my files in xs
directory"
I can't filter input-dirs by name, so I'm a little unsure how to map original name to the temp name.
@mobileink: how would which part work? sorry, was in meeting
was wondering what projars adds to clojars etc. the analytics and auditing stuff mainly? going back to @jethroksy 's question "Is there a function that gets all dependencies, including those in pods?" - could projars tell me something like "your build uses n pods and here are their deps"?
@mobileink: oh - not quite. the main thing is clojars mirror for your company. the secondary things are reports. it couldn't show youa bout pods, but it could do like "the application asking for jars from this IP in this time period requested these jars, 2 of which we've flagged because of vulnerabilities - here are alternatives"
flagging things with no/incompatible licenses in their poms is another angle
that would be useful. but it would only happen at fetch time, correct? after that the resolution mechanism would not talk to projars since the jars would be available locally? so you'd look at some kind of report to see if you have problems, rather than be notified each time you build?
@mobileink: correct, tho it would be easy to blow the maven cache away on e.g. CI
altho that could have problems too. the lowest denominator is definitely the humble .pom
a related question: how hard would it be to add some kind of -verbose option for pods, so that when you run one you get a classpath dump?
not that I'm in dire need of such a thing, but I like knowing exactly what's going on...
@mobileink: you mean like an option to make-pod
that causes it to log or something?
@escherize: btw you're on a roll, keep crushing it my friend
something like that, not really sure. maybe it sets a switch so with-call-in
etc. log something. you wouldn't want to use it much but it might be very useful for troubleshooting
esp. since pods are first class. i can imagine having a dynamically configured pod where i'm really not so sure what's in it. 😉
thanks to boot @alandipert !
@mobileink: i see. i can definitely imagine maybe a library for inspecting pods, that could use the existing stuff for running code in pods... and the more recent stuff that lets you run code in any existing pod, even ones you didn't create
shall i open an issue? not a pressing issue for me right now but good to have on the list?
sure, maybe mark it help-wanted and it can be a plase to discuss
is there a recommended best-practice for handling profiles and synchronizing them with a project.clj? I want to put credentials in a (non-scm) file -- which I have working fine -- but I also want to pick them up in project.clj so Cursive can see them.
I should add that the goal is to not dump the credentials into the project.clj -- I'd like to be able to check that one into scm to simplify getting started for new devs.
(I also realize this somewhat raises the question of whether boot is the right solution for a Cursive-native project...)
@curtosis: project.clj can have slurp
and def
and other things before the defproject
— maybe that already gets you the dynamic-ness you need?
@jethrosky: I have a lein-generate
task that writes a project.clj
, and I can pull in :repositories
@martinklepsch: hmmm... if I change profile.boot
to just def
the credential vars, then I could write project.clj
to load profile.boot
first.
though the generate-lein-project-file!
code (from the wiki) is a bit complex to rewrite to do that...
@curtosis: just pretending something would do it no?
Prepending might work better 😊
though it means I can't reuse the :repositories
map -- boot has already loaded the creds
not too difficult, just assoc
in new forms, of course. nice to have a real language instead of a dsl.
a general question before i start implementing something: i have a task that downloads bower packages, i want that to happen only once, and I want the downloaded stuff to be available across projects. the obvious thing to do is mimic maven: put the packages in e.g. ~/.bower/bower_components and then soft-link them into the project. i have the download bit working, but before i go on to add more logic, is this the Right Way to go about this? it does go outside of the fileset; is there a more bootish way to do this?
@mobileink: boot provides a persistent cache
so in effect if i did this with bower i would be putting the bower repo somewhere in /.boot/cache instead of /.bower/bower_components?
boot.user=> (doc cache-dir!)
-------------------------
boot.core/cache-dir!
([key & {:keys [global]}])
Returns a directory which is managed by boot but whose contents will not be
deleted after the build is complete. The :global option specifies that the
directory is shared by all projects. The default behavior returns different
directories for the same key when run in different projects.
@curtosis: have you tried doing something like this: https://github.com/boot-clj/boot/blob/master/boot/pod/project.clj#L1-L5
you should be able to ~ the username and/or password you read from a file with that technique
cordwainer: somebody who makes shoes from new leather. cobbler: somebody who repairs old shoes. you cud google it!
last: a mechanical form that has the shape of a human foot. forget "template"! you make boots with lasts! ;)
somewhere knuth said in so many words that metafont may be harmful because once you get the hang og typeface design it may take over your life. I'M LOOKING AT YOU, BOOT! I HAVE A FAMILY TO FEED! (not rilly, just a boss who's wondering if boot really is the greatest thing since sliced bread.)
i'm sure whatever your boss does could be factored into a few boot tasks
hahaha - my all time favorite s energy is Charlie Chaplin make a meal out of his boots. I think it was in Gold Rush. If you haven't seen it it's the funniest ever.
be sure to let him know that if he ever questions your tools
ok probably not, and that's bad advice
also the one where he's stuck in the machine cogs with just his head sticking out of the machine
my boss is a finance guy - his job is to disappoint, probably. you got a boot task for that we'll buy!
I do nah unnestand why Chaplin is not better known these days. I think he's the greatest artist os 20th cent.
I wonder what other famous boot episodes in history or mythology are out there. fun.
ok, in all seriousness, I really do think boot is about as close as we get to a killer app for clojure. I'm planning out (ok, that's an exaggeration) some blog posts about it. one thing I'd like to do is properly introduce the devs. who the heck are you guys, how the heck did you come up with this idea, when, where, etc.
are you game? if so we could so some kind interview privately or here on slack, which I'm sure others would like.
@alandipert ? any others?
I mean for my own purely selfish reasons I'd be happy to ask away. but boot is Serious. If you folks are willing to do some kind of q and a maybe we should announce it , at least on the clojure list.
you do know you're about to become superstars, right? not that you're not already super, I'm just sayin'.
@micha: that would work fine for boot, but I need to put the creds somewhere leiningen can find them as well; lein only supports string literals and environment variables, and I couldn't figure a better way to do that than just writing the creds to a profiles.clj
that can be excluded from scm.
meantime I promise I'll do some blog posts. you guys, well, playing hard to get is often a winning strategy. we all love a mystery.
sorry, i caused a bit of a commotion at work this morning, still cleaning up the damage