This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-07
Channels
- # admin-announcements (4)
- # aws (2)
- # beginners (25)
- # boot (116)
- # braid-chat (4)
- # cider (6)
- # cljsjs (4)
- # cljsrn (17)
- # clojure (196)
- # clojure-austin (23)
- # clojure-belgium (5)
- # clojure-dev (78)
- # clojure-dusseldorf (6)
- # clojure-italy (2)
- # clojure-japan (6)
- # clojure-poland (1)
- # clojure-russia (132)
- # clojure-sdn (1)
- # clojure-uk (26)
- # clojurescript (87)
- # code-reviews (3)
- # core-async (26)
- # cursive (8)
- # datomic (40)
- # devcards (8)
- # emacs (4)
- # funcool (32)
- # hoplon (30)
- # jaunt (34)
- # jobs (1)
- # lein-figwheel (1)
- # leiningen (5)
- # om (14)
- # onyx (8)
- # overtone (31)
- # parinfer (14)
- # proton (8)
- # protorepl (1)
- # re-frame (30)
- # reagent (10)
- # spacemacs (2)
- # untangled (107)
- # yada (3)
I put this here because I don't know if it makes sense to actually add it to boot's util functions: https://github.com/boot-clj/boot/wiki/Snippets#add-previously-resolved-jar-to-the-fileset
a question, is this correct?
(def deps #{['org.clojure/clojurescript "1.8.34"]}) => #'replumb.boot-cljs-src/deps
(:dependencies my-new-env) => [[org.clojure/clojurescript "1.8.34"]]
(count (pod/resolve-dependencies my-new-env)) => 8 (???)
ok the answer is no, but am I missing something obvious?
oh wait, right, transitive deps, that's what it is
Apologies 😉
Hi, wondering if there's a way to force boot to resync with the canonical directories from the repl? I can see a specific file in the boot cache that is behind the canonical file. I notice that there's a private sync-user-dirs! function in boot.core.
I have functions that call tns/refresh (in addition to other things) and would call a boot sync too
I wish I could reliably reproduce it. I do have this issue: https://github.com/boot-clj/boot/issues/248
there was a change i think related to fsevents where it sets a hard limit on how many event handlers you can create
another option, if you need to process those files with boot tasks, is to sync them into a cache dir
you can then add the cache dir to the classpath with the functions in boot.pod if you wish
I am trying to write a test to check that a macro expands to an expected list, using core.test. For some reason the arg of macroexpand
is not being evaluating, and it just being returned.. Has anyone ever seen this before?
(deftest well-formatted-usecase [] (let [output (macroexpand '(defusecase foo :default with good-policy [x] "Foobar"))] (is (= output '(. foo clojure.core/addMethod :default (clojure.core/fn [x] (clojure.core/if-not (clojure.core/apply good-policy [x]) (throw adstage-report-center.use-case/unauthorized-exception) "Foobar")))))))
(ns adstage-report-center.use-case-test (:require [adstage-report-center.policies :refer [good-policy bad-policy]] [adstage-report-center.use-case :refer [defusecase malformed-usecase-message]] [clojure.test :refer :all] ))
FAIL in (well-formatted-usecase) (use_case_test.clj:9) expected: (defusecase foo :default with good-policy [x] "Foobar") actual: (. foo clojure.core/addMethod :default (clojure.core/fn [x] (clojure.core/if-not (clojure.core/apply good-policy [x]) (throw adstage-report-center.use-case/unauthorized-exception) "Foobar"))) diff: - [defusecase nil :default with good-policy [x] "Foobar"] + [. nil clojure.core/addMethod :default (clojure.core/fn [x] (clojure.core/if-not (clojure.core/apply good-policy [x]) (throw adstage-report-center.use-case/unauthorized-exception) "Foobar"))]
that's what you would see if the name defusecase
is not refered into the namespace where you're running the test
i must be confused, but it looks like the test output is expecting to see (defusecase ...
if i eval the macroexpand it expands to the second expression. thats how i got the expression
expected: (defusecase foo :default with good-policy [x] "Foobar")
actual: (.
foo
clojure.core/addMethod
:default
(clojure.core/fn
[x]
(clojure.core/if-not
(clojure.core/apply good-policy [x])
(throw
adstage-report-center.use-case/unauthorized-exception)
"Foobar")))
yeah expected is the first expression in my is
block, no? which is why i think its just returning the list rather than expanding it.
the diff is the difference between what the test harness expected the value to be and what the value actually was
this is also strange to me because the is
macro doesn't know about output
or that big list
i bound the macroexpand to a var in the ns, and referenced it in the deftest, and it worked