This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-13
Channels
- # admin-announcements (4)
- # beginners (14)
- # boot (41)
- # capetown (1)
- # carry (10)
- # clojure (168)
- # clojure-czech (11)
- # clojure-mexico (3)
- # clojure-quebec (1)
- # clojure-russia (63)
- # clojure-spec (108)
- # clojure-uk (44)
- # clojurescript (37)
- # component (5)
- # data-science (2)
- # datascript (5)
- # datomic (3)
- # defnpodcast (9)
- # dirac (14)
- # emacs (18)
- # events (1)
- # funcool (2)
- # garden (2)
- # hoplon (48)
- # leiningen (6)
- # numerical-computing (1)
- # off-topic (8)
- # om (61)
- # onyx (22)
- # proton (14)
- # re-frame (50)
- # reagent (2)
- # uncomplicate (1)
- # untangled (41)
- # vim (5)
- # yada (5)
@x1n4u: the problem is map
is lazy, try with:
(defn greet-persons [persons]
(doall (map #(println "Hello, " %) persons)))
for things like this i tend to use doseq
which is for explicit side effect, like:
(defn greet-persons [persons]
(doseq [p persons]
(println "Hello, " p)))
you can turn them off via boot -C repl
other than that, none i'm aware of
boot -C
also turns off colorized stack traces
right, it seems all or nothing. I was hoping to find a way to keep colors but have it work with my terminal background color
thanks for the confirmation, @alandipert
your terminal emulator might support remapping the codes to different colors
it just uses the ANSI codes, which doesn't support actual specification of color values
When I do (boot (sift :include #{#"logback.xml"}) (show :fileset true))
the output show a fileset with exactly one file as I expect.
I have this so far:
(deftask cf-template
"Generate a cloudformation template"
[t template VALUE kw "The template to generate (one of [infrastructure | environment])"]
(let [tmp-dir (tmp-dir!)
outfile (io/file tmp-dir "environment.json")
_ (info (str "look for " outfile))
cf-template (json-generate (eval (:definition (template cf-templates))) {:pretty true})]
(fn middleware
[next-handler]
(fn handler
[fileset]
(spit outfile cf-template)
(let [new-fileset (add-resource fileset outfile)]
(commit! new-fileset)
(next-handler (fileset-added fileset new-fileset)))))))
Quick Q: what is the minimum version of Clojure that Boot supports in a project?
It seems to be Clojure 1.6.0. When I try BOOT_CLOJURE_VERSION=1.5.1 boot repl
, I don’t get anything … it just silently goes back to the command prompt.
@seancorfield: definitely 1.6
although i don't know exactly why, just that it's what we started with
I guess I was just surprised at the "silent treatment" I got from it. An error would be better 🙂
i agree, that's super weird
It does have a non-zero exit status (254) but prints no message...
(hmm, that’s -2 as an exit status right?)
So it’s likely exiting here (line 402) with that status and not printing any exception https://github.com/boot-clj/boot/blob/master/boot/base/src/main/java/boot/App.java#L388-L402
So basically Boot is swallowing the exception 😐
If I want to build a new version of Boot to test a modification to Boot.App
, how would I go about that?
Figured it out… So here’s the actual exception. Not sure what could be done to make the messaging better or whether it could be made to work with pre-1.6.0 Clojure:
Boot failed to start:
java.lang.NoSuchMethodError: clojure.lang.Reflector.invokeNoArgInstanceMember(Ljava/lang/Object;Ljava/lang/String;Z)Ljava/lang/Object;
at boot.pod$eval_in_STAR_.invoke(pod.clj:440)
at boot.main$_main.invoke(main.clj:148)
at clojure.lang.Var.invoke(Var.java:427)
at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:159)
at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:150)
at boot.App.runBoot(App.java:399)
at boot.App.main(App.java:491)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at Boot.main(Boot.java:258)
i like the idea of the exception being visible, less excited about trying to print a certain msg
the exception itself when googled yields relevant results
I agree that Googling that exception yields relevant results (although not perhaps immediately obvious results) that should allow a user to deduce that this is a Clojure version compatibility issue.
Do the Boot docs clearly state 1.6.0 is the minimum supported version?
I can’t find anything about minimum Clojure version. I’ll edit a couple of the wiki pages.
thanks!
Done!
@alandipert: thanks, and soory for the latency 😁
speaking of specifying the clojure version, is the per-project boot.properties
file supposed to take precedence over ~/.boot/boot.properties
?
my project has set the clojure version to 1.8.0 in both build.boot’s deps and the boot.properties, but it’s still running under 1.7
@mattly: I just tested that — local boot.properties
file in a project — and it successfully overrode my default Clojure version. What’s in your boot.properties
file?