Fork me on GitHub
#boot
<
2016-11-08
>
pseud08:11:18

Hello - I’m gathering arguments. In your opinion, what are the arguments in favour of using boot over leiningen ?

olegakbarov09:11:36

What might cause this type of stacktrace in ClojureScript application?

2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2016-11-08 12:52 java[39083] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework) 2016-11-08 12:52 java[39083] (FSEvents.framework)
FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)

pseud10:11:04

@pandeiro you maintain some docker images we use — I’d like to know your stance regarding boot<>lein. Which do you prefer and why ?

mitchelkuijpers14:11:49

Has anyone else ever had this problem with boot-cljs-test?

Running cljs tests...
08 11 2016 15:54:27.654:WARN [web-server]: 404: /output.out/cljs_deps.js
Chrome 54.0.2840 (Mac OS X 10.11.6) ERROR
  Uncaught SyntaxError: Unexpected end of JSON input
  at 

mitchelkuijpers15:11:56

It used to work.. I think 😛

mitchelkuijpers15:11:11

Oh it looks that the 404 is not a problem

micha15:11:46

@olegakbarov that looks like an issue with FSEvents, the system file watching protocls

micha15:11:53

which OS are you on?

mitchelkuijpers15:11:47

This was a false alarm.. Ignore me

micha15:11:50

@mitchelkuijpers 🙂

olegakbarov16:11:34

@micha im on macOS; this came up when i was trying to add some js externals https://github.com/alesguzik/cljs-npm-bundle

olegakbarov16:11:56

any chance node_modules folder can cause this type of issues?

micha16:11:30

@olegakbarov those are just log messages, right?

micha16:11:42

it's not actually causing a failure?

micha16:11:22

there is a limitation of FSEvents on OSX, you can only have a certain number of watched nodes

micha16:11:51

if your node_modules contains tens of thousands of files and directories it could be an issue

olegakbarov16:11:23

yeah, that looks very much like this

pandeiro18:11:30

Hi @pseud - I still use both, since some projects I work on use lein, but if I am starting a project from scratch, I use boot.

pandeiro18:11:13

My lein docker image probably needs updating; I just updated the boot one to use the alpine-based java image, reducing it by about 500MB

nonrecursive18:11:44

hey y’all is there any way to have boot automatically use the clojure version set by set-env!? I get that boot has to already load a clojure version before reading set-env… but is there some magic I don’t know about?

micha18:11:34

@nonrecursive the usual way is to make a boot.properties file in the project that has the same version as what you use in set-env!

micha18:11:55

that will override your global preferences in ~/.boot/boot.properties

micha18:11:56

additionally, sometimes you want to go the other way, like you don't care which version of clojure you use, but you want to have some clojure dependency in your env because of maven

micha18:11:30

in that case i do (set-env! :dependencies [['org.clojure/clojure (clojure-version)]])

micha18:11:58

so if you have a project you can make a boot.properties file with BOOT_CLOJURE_VERSION=1.8.0 or whatever

micha18:11:15

then in your :dependencies you can put ['org.clojure/clojure (clojure-version)]

nonrecursive18:11:34

sweet that’s what I was looking for 😍

micha18:11:35

that will allow you to set the version of clojure in one place, the boot.properties file

micha18:11:56

how's the life man?

pandeiro19:11:16

are there instructions somewhere for creating/using the secring.gpg that boot build-jar push-release asks for now?

pandeiro19:11:56

i don't have an existing keypair, i guess i can just create a new one and that's that...

micha19:11:19

@pandeiro there should be info in the wiki about it, i think?

pandeiro19:11:58

Thanks @micha, I'll check that out

pandeiro19:11:57

looking at bootlaces, it seems like it hardcodes that path and passes it to push

pandeiro19:11:16

I'll just create that file in that location, but I'm not sure exactly what it is

dominicm19:11:08

@pandeiro ooh, alpine works for java now? That's awesome. I lost a limb trying to get that working a few months ago.

pandeiro19:11:44

@dominicm yeah if you docker pull pandeiro/boot:latest, it's just 150MB, which is great

richiardiandrea19:11:21

@dominicm @pandeiro I confirm as I have a docker app on ECS that works like a charm

dominicm19:11:14

150MB is exactly how big it should be. The size of some images is truly appalling.

richiardiandrea19:11:26

I have used develar/java:8u45 though

pandeiro19:11:21

@richiardiandrea there's also this: https://hub.docker.com/_/openjdk/ (not sure if you specifically want the oracle jdk)

richiardiandrea19:11:09

oh thanks that's great, at the time it was the only one I found

pandeiro19:11:53

Hmm, I guess my keyring troubles might be due to the GnuPG 2.1 format... I only have a pubring.kbx in my ~/.gnupg dir

richiardiandrea19:11:06

ah yes that changed stuff

richiardiandrea19:11:28

I actually haven't deployed using gpg and boot in a while

pandeiro19:11:46

me neither 😕 -- i'm trying to do some long, long overdue maintenance on boot-http

richiardiandrea19:11:06

oh man thanks! 😄

pandeiro19:11:16

yes! apologies!

richiardiandrea19:11:24

let me see the wiki page

pandeiro19:11:36

i haven't used clojure at all in the last 6 months, sad stuff

richiardiandrea19:11:30

I have concluded as well my last Clojure adventure and looking for new stuff, but let me see first if I can help you with that

richiardiandrea19:11:04

@pandeiro so which step is not working, it looks like the wiki procedure abstracts over gpg details (call to gpg-decrypt)

richiardiandrea19:11:20

if you set gpg2 shouldn't it work?

pandeiro19:11:31

yeah, it is the push-release step

richiardiandrea19:11:46

I mean export BOOT_GPG_COMAND=gpg2

pandeiro19:11:32

same error, still no such file

pandeiro19:11:18

and there isn't... i guess i just need to understand how the pubring.kbx etc in my .gnupg map to pubring.gpg / secring.gpg

richiardiandrea19:11:51

mmm...but that's what I am saying, if you created a new keypair gpg2 should read it from there, unless push-release explicitely reads the .gnupg folder, which is probably not desirable, I am checking the code

pandeiro19:11:02

yeah it does

pandeiro19:11:31

i think it is in the built-in push task itself

richiardiandrea20:11:09

or you can alias gpg with gpg2 if it is not already done

pandeiro20:11:47

i tried exporting the environment variable and i'm pretty sure gpg2 was used

pandeiro20:11:59

but it isn't referenced anywhere (?)

richiardiandrea20:11:56

yes it looks like it is not used

richiardiandrea20:11:14

(maybe some old stuff)

richiardiandrea20:11:26

@pandero which version are you using? have you tried 2.7.0-rc1?

pandeiro20:11:36

No, but I think I may have fixed it by exporting the secret key to that filepath

pandeiro20:11:15

I did gpg --export-secret-keys > ~/.gnupg/secring.gpg -- that at least produced a different error when I tried to push 😉

richiardiandrea20:11:36

lol but I would try the new version, look, that param has been deprecated as you don't usually need it explicitely: https://github.com/boot-clj/boot/blob/ac835cea8c18e926bb843e01579b86e3f30458d2/doc/boot.task.built-in.md#push

pandeiro20:11:28

OK, I will try that out

pandeiro20:11:52

But otherwise, it seems to have worked: https://clojars.org/pandeiro/boot-http

pandeiro20:11:01

Thanks for the help @richiardiandrea !

richiardiandrea20:11:10

oh cool no problem !

symbit20:11:58

Has anyone increased the available heap with -Xmx= on windows for 'boot dev'? Tried the boot.l4j.ini. no dice.

richiardiandrea20:11:35

I set this in my .bashrc: export BOOT_JVM_OPTIONS="-Xmx1g -client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xverify:none -XX:-OmitStackTraceInFastThrow"

richiardiandrea20:11:09

there should be a section in the wiki though

symbit20:11:22

@richiardiandrea you're using cygwin bash on windows?

richiardiandrea20:11:22

ah sorry windows

richiardiandrea20:11:41

no sorry I don't use windows, I misread that 😉

ddellacosta21:11:15

hey, so I’m trying to get going with boot as a complete newbie but long-time lein user, and I am having trouble figuring out how to simply do the equivalent of lein new <project-name> so I can get something to specify dependencies and futz around to test out a project-specific repl. The docs make it seem as though I will have to write a bunch of code to get this outcome. Is that the case, or am I missing something obvious?

kenny21:11:03

@ddellacosta You can use this https://github.com/seancorfield/boot-new

boot -d seancorfield/boot-new new -t app -n myapp

ddellacosta21:11:09

@kenny thanks. So that is not baked into boot huh?

kenny21:11:17

Not yet. I believe there was a discussion about adding it in. Not sure where that conversation went though.

ddellacosta21:11:00

also, those flags, are those boot args or boot-new args? I’m assuming that they are boot-new args as boot doesn’t seem to have -n but I’m not sure I understand where boot ends and boot-new begins

micha21:11:43

the -d is an option to boot

kenny21:11:45

-d is a boot arg which adds seancorfield/boot-new as a dependency. new is the task name (from boot-new) and everything after new is args & options to the new task.

ddellacosta21:11:02

I see, thanks @micha and @kenny

ddellacosta21:11:58

okay, next set of questions. I want to play with spec, so I tweaked the default set-env! call’s :dependencies value which boot-new created to look like this:

4│  (set-env! :resource-paths #{"resources" "src"}
  5│            :source-paths   #{"test"}
  6│            :dependencies   '[#_[org.clojure/clojure "RELEASE"]
  7│                              [org.clojure/clojure "1.9.0-alpha13"]
  8│                              [adzerk/boot-test "RELEASE" :scope “test”]])

ddellacosta21:11:31

however, when starting up a repl via cider-jack in Emacs, I get

3│  boot.user> *clojure-version*
  4│  {:major 1, :minor 7, :incremental 0, :qualifier nil}

ddellacosta21:11:40

so what am I not understanding now about how boot works?

ddellacosta21:11:05

(also, 1.7 ??)

pseud21:11:07

wouldn’t it be cider-jack-in-clojurescript ?

ddellacosta21:11:15

@pseud I don’t know, would it?

pseud21:11:30

I haven’t done any boot work with cider yet, really. But I recall with lein that cider-jack-in got me into my clojure repl and cider-jack-in-clojurescript booted a clojure-process which fired up figwheel. I’d imagine ‘cider-jack-in’ attempts to start something like “boot repl"

kenny21:11:23

Don't know anything about cider + boot but if you are starting a REPL with boot repl then you will need to add a boot.properties file with

BOOT_CLOJURE_VERSION=1.9.0-alpha14

ddellacosta21:11:21

@pseud I just want a vanilla repl w/clojure 1.9 @kenny Okay, I can do that—but I’m specifically curious why my dependency didn’t get picked up.

pseud21:11:48

Oh snap, forget about me. I’m tired. 🙂 Yes, you need a boot.properties file in the project.. boot -V > boot.properties and then update the version number of clojure. Otherwise you’ll get 1.7.0

micha21:11:52

@ddellacosta boot needs to run your build.boot file etc in clojure

micha21:11:17

so the version of clojure needs to be chosen before your code runs

ddellacosta21:11:37

@micha I guess there is a way to hook up cider so it does this by default, but it doesn’t out of the box huh?

ddellacosta21:11:59

oh, I see—so the set-env! won’t work in the case of clojure regardless based on what you’re saying @micha

micha21:11:43

that's what ~/.boot/boot.properties can help you with

micha21:11:43

or ./boot.properties

pseud21:11:49

Not sure if it’s the answer exactly but. It’s my understanding that lein fires up its own process, then spawns another JVM process for your project (unless you use trampoline) — that would allow lein to start with one version of clojure, and your program to use another. My understanding is that boot starts up a single JVM process and hands off control to your app — hence whatever clojure version mentioned in your boot.properties file will be what you’ll eventually get. But maybe I’ve misunderstood

ddellacosta21:11:05

okay, thanks @pseud and @micha and @kenny

ddellacosta21:11:17

think I can figure it out from here

micha21:11:30

yep that's right

micha21:11:46

you can, however, run differetn versions of clojure in "pods"

ddellacosta21:11:03

okay, I will put that in the list of something to look into once I’ve got the basics down 😄

micha21:11:20

similar to starting a separate jvm, but it's all in the same process

pseud21:11:27

ddellacosta: hang in there.. Boot ends up being so much more convenient, I promise 🙂

micha21:11:55

similar to starting a separate jvm, but it's all in the same process

ddellacosta21:11:41

So after about 20 minutes I can already say, for the record, that it may be useful to have a bit more of a comprehensive “coming from leiningen? Start here…” tutorial somewhere. This doesn’t cut it: https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users

ddellacosta21:11:49

That’s not a comment on boot, as I don’t know enough about it yet to comment

ddellacosta21:11:05

but it has been pretty un-intuitive to get going from the path I thought was the most obvious, coming from lein

ddellacosta21:11:18

which I imagine most users will be…but perhaps not.

ddellacosta21:11:40

Again, this isn’t going to deter me from using boot—I’m not criticizing it in any way, just the lack of docs for my specific path in

ddellacosta21:11:03

I hope it’s clear I mean that very much constructively!

micha21:11:35

that wiki isn't really supposed to be a getting started type thing

ddellacosta21:11:08

Gotcha. My path in was http://boot-clj.com/ click on “get started” -> https://github.com/boot-clj/boot#install -> “huh how do I create a project” (then, maybe this leiningen entry in the wiki will help?)

pseud21:11:55

@ddellacosta Could be true. I moved to boot because I had some issues while wanting to develop a library while developing an example which used it - something you’ll need “checkout dependencies” for in lein which is hell. Anyway, I didn’t really consult the lein migration page, but instead found a few blog posts which explained how boot tasks worked, how each task is self-documenting (`boot <task> -h`) and how they could be composed and how the deftask form worked. From there, I never looked back. TL;DR - there’s some good blogs providing quick overviews of how boot works 🙂

onetom23:11:24

@micha @alandipert just watched this talk from david nolen and he mentioned cognitect uses boot too https://youtu.be/mty0RwkPmE8?t=3052