This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-18
Channels
- # admin-announcements (90)
- # alda (1)
- # aws (23)
- # beginners (60)
- # boot (217)
- # cljs-dev (20)
- # cljsjs (23)
- # cljsrn (85)
- # clojars (28)
- # clojure (101)
- # clojure-art (1)
- # clojure-berlin (10)
- # clojure-dev (16)
- # clojure-my (2)
- # clojure-russia (194)
- # clojure-sg (7)
- # clojure-ukraine (1)
- # clojured (1)
- # clojurescript (99)
- # clojurex (1)
- # community-development (6)
- # core-matrix (11)
- # cursive (26)
- # datomic (51)
- # euroclojure (30)
- # hoplon (560)
- # jobs (44)
- # ldnclj (34)
- # mount (23)
- # music (3)
- # off-topic (10)
- # om (145)
- # onyx (3)
- # perun (38)
- # portland-or (2)
- # proton (55)
- # re-frame (64)
- # reagent (26)
- # ring-swagger (3)
- # spacemacs (21)
- # sydney (3)
- # yada (1)
so if I want to use when or do in a pod, I need to include clojure.core
of course right?
and every single symbol will need fully qualified namespace (e.g.: clojure.core/when) ?
@richiardiandrea: clojure.core is referred into all namespaces, in pods too
right I forgot that, I split my util -> https://github.com/ScalaConsultants/boot-cljs-src/blob/master/src/replumb/boot/util.clj#L18
maybe I will have a pod-util
if it grows too much
the doc string of my util functions states what deps they need
this can evolve in having metadata, :pod-deps
for instance, for documentation purposes
yeah, better, I would need to require them in the pod ๐
right, I had not thought about it
it is definitely a better solution, and you don't need to fully qualify symbols
isn't there an implicit do
in with-eval-in
?
k great
very handy
will try it out
understand, great
tnx for the hint
i am going to try in the test too, where I guess it is a bit different there
@seancorfield: good job, boot new works nicely ๐
a question is: does it support +
options like: boot -d seancorfield/boot-new new -o . -t tenzing +reagent +divshot +test
?
@richiardiandrea I don't know what those options would do. Feel free to open an issue on GitHub outlining what you'd like to see supported. I'm open to adding any features that folks find useful.
@jethroksy: not sure if Boot supports Cygwin? It's a funky environment. I use Boot on Windows with the plain command prompt and with Git Bash (although the REPL doesn't work in the latter).
Ah, yes, that doesn't surprise me. Cygwin isn't really UNIX enough for a lot of things.
I think it's the worst of both worlds. I recommend GOW - Gnu On Windows - which adds common UNIX utilities to the regular command prompt.
It's not perfect but it's s lot less intrusive than Cygwin.
Nope.
@richiardiandrea: now I see what you're asking, Boot new already supports that.
I thought you were asking for multiple templates (which would also be supported by using new multiple times in the pipeline with the --force option).
@martinklepsch: am I right that with Tenzing you'd say lein new tenzing myapp -- +divshot +test
etc? If so @richiardiandrea should be able to do boot new -t tenzing -n myapp -a +divshot -a +test
yes?
@seancorfield: good! sorry I did not know let me try
@seancorfield: I tried and replied, still something off I guess, I will check if my setup is good
The extra args worked when I tried the Frege template. Will take a look at Tenzing tomorrow.
yes tomorrow for me as well ๐
I was just setting up our environment on a clean machine and surprisingly I saw many clojure versions being downloaded:
> boot dev
Starting reload server on
Writing boot_reload.cljs...
2016-01-18 13:24:49.601:INFO::clojure-agent-send-off-pool-0: Logging initialized @6435ms
2016-01-18 13:24:49.646:INFO:oejs.Server:clojure-agent-send-off-pool-0: jetty-9.2.10.v20150310
2016-01-18 13:24:49.679:INFO:oejs.ServerConnector:clojure-agent-send-off-pool-0: Started ServerConnector@34b7309c{HTTP/1.1}{0.0.0.0:3104}
2016-01-18 13:24:49.680:INFO:oejs.Server:clojure-agent-send-off-pool-0: Started @6514ms
Started Jetty on
Retrieving clojure-1.3.0.jar from
Retrieving clojure-1.6.0.jar from
Retrieving clojure-1.6.0.jar from
Retrieving clojure-1.2.1.jar from
Retrieving clojure-1.4.0.jar from
Retrieving clojure-1.5.1.jar from
Retrieving commons-codec-1.8.jar from
Retrieving clojure-1.5.1.jar from
...
i suspect different pods require different versions of clojure, but still it's too many versions, no?
i have [org.clojure/clojure "1.7.0" :scope "provided"]
in build.boot though but since it's not a library, i guess shouldn't say :scope "provided"? though technically it's provided by boot, no? it provides the version from boot.properties
, no?
@richiardiandrea: I just tried the Tenzing template (we ended up watching TV longer than I expected) and it works fine for me locally so whatever I'm doing with the leiningen-core
library in Boot new is breaking on something you have in your ~/.lein/profiles.clj
๐
Oh thanks! no access to my pc now but I will share the file tomorrow, or if there is a way, i will enable debug mode and report
I had a feeling there would be a number of edge cases in Leiningen's behavior that I'd end up having to debug, figure out, and then support somehow
@seancorfield: i'm using boot-expectations, and a single test takes 12s to run on my computer
@jethroksy using watch task I assume?
Do you have any slow to require namespaces in the test namespace?
Boot-test uses a fresh pod (Clojure runtime) for every test run and I believe boot-expectations does the same - because of that you might pay for that kind of thing for every run
(There are ways to avoid that)
@jethroksy: in a fresh repl that has not required anything require the namespace and see how look it takes
Maybe time
helps
Datomic has been a culprit in that regard previously
Can you paste the complete test ns?
And are you 100% certain that those namespaces haven't been required previously in the repl session? (E.g. Via your init-ns)
(ns edubot.test-slack-util
(:require [edubot.slack-util :as sut]
[expectations :refer [expect]]))
(time (require 'edubot.slack-util))
"Elapsed time: 0.17587 msecs"
(time (require 'seancorfield.boot-expectations) )
"Elapsed time: 0.144637 msecs"
No more like the actual test namespace
Including the tests in it
Is there a migration guide for the explicit target directory change in the latest boot?
https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-03.md explains the target
task, but I don't see it mentioned in the official docs
Also I'd be interested in an explanation how using comp
in build.boot affects the order of execution. Does it matter if target
(or other tasks) go at the beginning or end (or middle) of the comp
chain?
@pesterhazy: in my understanding, like transducers http://clojure.org/reference/transducers
@pesterhazy: https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/task/built_in.clj#L215-L224 is docs enough, I think. Also available through boot target --help
IIRC.
@jaen, I disagree. If people upgrade to latest boot and see a deprecation warning, they should not be required to browse the source to find out what's going on.
I guess what I'm saying is, any reason not to add a note to the wiki about this? (easy to google!)
Well, boot target --help
is not source, but other than that I agree - note could say something about doing boot target --help
to get an explanation.
actually, I'd strongly prefer a web site somewhere that explains the core tasks
the only place boot tasks are documented right now is in the --help
cli, but sometime you can't access that
(e.g. you may have a borken build.boot
and boot doesn't start)
That is a good idea, think. It's certainly more handy than navigating to built_in.clj
, it usually takes me a while before I remember where the file is in the sources.
I imagine it shouldn't be that hard to write a markdown help generator (so it's always up to date) from the task description and add some preface.
should be automatically generated for sure
@jaen: I also agree with @pesterhazy about an explanation on the tasks order. modern-cljs is for beginners and boot is used only as a build tool, even when it has to explain something more than the official guide to make the things clearer. I remember that while writing the tutorials I had the feeling of adding something on the tasks order more excplicit, but I should have introduce the different behaviour of comp
when used with transducersโฆ.I could eventually add it, if you think itโs useful. Or you can help in doing that with a PR as well.
also I think it'd be awesome to have a boot
guide for the new clojure site
they're accepting PRs now
there's a section for tools (still empty), so boot
might be a great candidate
@jaen, there's a "tools" section in the "guides" menu: http://clojure.org/guides/getting_started
@magomimmo: my remark wasn't about the task composition though. I was talking about boot tasks description and yes, I agree, a website that syncs to the current built-in task description would be neat.
@pesterhazy: how about this for a simple example of how boot tasks work?
(defn task-one [next]
(fn [value]
(println "before one - " value)
(let [result (next value)]
(println "after one - " result)
result)))
(defn task-two [next]
(fn [value]
(println "before two - " value)
(let [result (next value)]
(println "after two - " result)
result)))
(defn task-one-builder []
task-one)
(defn task-two-builder []
task-two)
(def task-stack
(comp (task-one-builder)
(task-two-builder)))
(defn write-to-disk-or-something [value]
(println "just doing muh job on - " value)
{:result value})
(let [pipeline (task-stack write-to-disk-or-something)]
(pipeline {:some "thing"}))
That is, at least how I understand they work, someone please correct me if that's wrong - it's basically like Ring request cycle - go through all the middlewares and then back again.
@jethroksy: sorry for not replying earlier. I was referring to your test namespace as the file that has the test which is taking a long time to run
@martinklepsch: that would be just the two namespaces i pasted
@pesterhazy: yep. someone should add boot
to the clojure getting started guide. I would leave this task to the boot
maintainers, because that section is very sensitive
@jethroksy: not just the namespace form but the whole file please (if possible)
(ns edubot.test-slack-util
(:require [edubot.slack-util :as sut]
[expectations :refer [expect]]))
(expect 1 1)
Oh ok. Have you tried rerunning with the edubot.slack-util
dependency removed?
(ns edubot.test-slack-util
(:require #_[edubot.slack-util :as sut]
[expectations :refer [expect]]))
(expect 1 1)
@jethroksy: just to double check: you said you're using watch
task โ is 12s for the first run or every run after a file change?
@martinklepsch: its definitely my project
Starting file watcher (CTRL-C to quit)...
Retrieving tools.reader-0.9.1.jar from
Ran 1 tests containing 1 assertions in 8 msecs
0 failures, 0 errors.
Implicit target dir is deprecated, please use the target task instead.
Set BOOT_EMIT_TARGET=no to disable implicit target dir.
Elapsed time: 7.488 sec
failure in (test_bar.clj:4) : foo.test-bar
(expect 1 2)
expected: 1
was: 2
Ran 1 tests containing 1 assertions in 16 msecs
1 failures, 0 errors.
clojure.lang.ExceptionInfo: Some tests failed or errored
data: {:test 1,
:pass 0,
:fail 1,
:error 0,
:run-time 16,
:ignored-expectations 0,
:type :summary}
clojure.core/ex-info core.clj: 4593
seancorfield.boot-expectations/eval90/fn/fn/fn boot_expectations.clj: 64
boot.task.built-in/fn/fn/fn/fn/fn/fn built_in.clj: 264
boot.task.built-in/fn/fn/fn/fn/fn built_in.clj: 264
boot.task.built-in/fn/fn/fn/fn built_in.clj: 261
boot.core/run-tasks core.clj: 794
boot.core/boot/fn core.clj: 804
clojure.core/binding-conveyor-fn/fn core.clj: 1916
...
Elapsed time: 2.437 sec
How is an easy way to add a TmpDir to a fileset without overwriting already existing entries?
@malesch: you can do it by specifying a :mergers` option you pass to the add-...
function
@micha: Do you have example Dockerfiles for use with boot-beanstalk?
@juhoteperi: i can look for one
Do you copy the repo contents to container and run boot inside container, or copy the artifacts into container?
But it means that it has to compile Cljs when it starts?
Ah right
@jaen, @pesterhazy there are autogenerated api docs, inluding the built-in tasks here: https://github.com/boot-clj/boot/tree/master/doc
@magomimmo: updated the readme: https://github.com/boot-clj/boot#getting-started
@micha, thanks for adding the link to modern-cljs!
@pesterhazy: see you at ClojureBridge this weekend?
those API docs are terribly useful, @micha, it'd be great if they was a more prominent link, e.g. in the "Tasks" section of the wiki
I'm in the process of writing a guide for perun, maybe you'd like to give it a try at some point
defnitely
it's not obvious that "api docs" include "task descriptions"
@pesterhazy: feel free to edit as you wish
@pesterhazy: btw, did you or jelle have a chance to try https://github.com/mjmeintjes/boot-react-native?
yup, I've submitted a few PRs already
https://github.com/mjmeintjes/boot-react-native/issues/13 โ "without building a new jar for every change" with boot watch build-jar
you can build the jar when things change without needing to do anything
the checkouts situation in 2.6.0-SNAPSHOT is better than what is available in 2.5.5 btw
the contents of the checkout dep jar are not in the fileset with 2.6.0-SNAPSHOT --checkouts option
@micha, added a note about API docs here: https://github.com/boot-clj/boot/wiki/Tasks (grey "note" at the top)
added a which can be shown via boot taskname --help
bit
I have a js file that I want to be able to require using :foreign-libs
โ Iโm sure I just have the configuration off a bit, it keeps not working. does anyone have an example project that does this?
is your js file a google closure namespace? like it can be compiled with advanced optimizations right?
the boot-cljsjs task has some things for that if you want: https://github.com/cljsjs/boot-cljsjs/blob/master/src/cljsjs/boot_cljsjs/packaging.clj#L125-L126
woot it works. btw was pretty confusing to have this issue https://github.com/adzerk-oss/boot-cljs/issues/35 closed as โwontfixโ โ I thought at first there was no way to do it
@jaredly: I think you can also accomplish that with a deps.cljs file in your boot classpath
@samflores: i think that's built into the repl, yes
I'm declaring :source-paths #{"src" "dev"}
and putting the file in the dev
directory. I thought that would be enough.
the second approach worked, but starting with boot repl
and changing to (in-ns 'user)
did not
Boot new now has support for Boot templates and has app
, default
, template
built-in (`task` is there too but has not yet been worked on so it is broken a.t.m.): boot -d seancorfield/boot-new:0.2.0-SNAPSHOT new -t app -n myapp
produces myapp
Boot-based project that you can boot run
, boot test
, and boot build
to produce a standalone JAR.
Iโll get task
"working" and then cut an 0.2.0
release and gather feedback on what the ideal Boot task template should look like.
Then Iโm going to look at https://github.com/weavejester/lein-generate and do something similar for Boot generators and cut an 0.3.0
release.
is util/dbug
working generally within with-eval-in
?