This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-12
Channels
- # admin-announcements (1)
- # bangalore-clj (13)
- # beginners (149)
- # boot (123)
- # cider (7)
- # clojure (167)
- # clojure-brasil (3)
- # clojure-greece (1)
- # clojure-korea (2)
- # clojure-new-zealand (2)
- # clojure-russia (70)
- # clojure-sanfrancisco (3)
- # clojure-spec (84)
- # clojure-uk (36)
- # clojurescript (300)
- # code-reviews (242)
- # community-development (34)
- # core-async (4)
- # css (1)
- # cursive (37)
- # datascript (1)
- # datomic (20)
- # defnpodcast (1)
- # dirac (15)
- # events (7)
- # garden (12)
- # hoplon (100)
- # lein-figwheel (11)
- # off-topic (2)
- # om (69)
- # om-next (3)
- # onyx (86)
- # planck (14)
- # proton (4)
- # protorepl (1)
- # quil (2)
- # re-frame (53)
- # rum (3)
- # untangled (1)
- # vim (50)
does anyone have experience with wiring up boot and pedestal for a clojurescript application?
i feel like an idiot asking this, but how do you just run a clojure application, via boot? i see a ton of examples for clojurescript.
last question of the night. is the set-env!
parameter :source-paths
how require
, from inside build.boot
, knows where to look?
require looks on the classpath, and set-env adds stuff to the classpath
although usually for clj code you want to use :resource-paths
That's for code that you want to ensure the build process and not be 'consumed', like .java
*endure
At this phase in your project tho the distinction is immaterial. Comes into play when you want to produce a standalone jar or war file
can set-env!
be called from within a deftask
? i've got a project that uses both clojure and clojurescript, with common stuff in cljc
files. my directory structure has parent folders for clj
, cljc
and cljs
. so something like: foo\src\clj\foo\core.clj
, foo\src\cljc\foo\common.cljc
, foo\src\cljs\foo\ui.cljs
.
my task for running or building the clojure server needs to look in clj and cljc folders
i see the clojurescript plugin takes the paths as part of that task config process, but i dont think i need this global source-paths. i need that specific to the clojure task.
Yes you can call it in deftask. But it's not scoped to the task, changes are still global. So it can impede task composability
In your case I'd recommend just adding them all at the top. Maybe consider adding your cljs code as :source-paths
Assuming this is an application it doesn't matter much what you choose
Usually you only need to be particularly discerning about what ends up in the jar when making a library
Hmm. I think I've got my build.boot
configured, but I'm getting an error when trying to run my task.
You can see my task here: https://github.com/ryancole/league-clj/blob/master/build.boot#L12-L15
And below is the error ...
PS C:\Users\Ryan\Projects\league-clj> boot start-server
clojure.lang.ExceptionInfo: No value supplied for key: boot.core$run_tasks$fn__930@4067a2f2
data: {:file
"C:\\Users\\Ryan\\AppData\\Local\\Temp\\boot.user1679637778079149830.clj",
:line 13}
java.lang.IllegalArgumentException: No value supplied for key: boot.core$run_tasks$fn__930@4067a2f2
...
org.httpkit.server/run-server/stop-server server.clj: 51
...
boot.core/run-tasks core.clj: 938
boot.core/boot/fn core.clj: 948
clojure.core/binding-conveyor-fn/fn core.clj: 1916
I'm not sure if this is coming from httpkit or boot. The httpkit related code seemed to work fine when use via leiningen.
(deftask start-server
"Start the application server."
[]
(run-server request-handlers {:port 8080})
@(promise))
this change with the promise will just block the pipeline and prevent boot from calling the stop-server fn that run-server returns
Hi I have a problem with a library we are using and I think it might be related to boot-pods and requiring namespaces in cljc: I think it might be going wrong wrong somewhere here: https://github.com/ladderlife/om-css/blob/master/src/main/om_css/core.cljc#L181
I already created a issue for this: https://github.com/ladderlife/om-css/issues/39 Is there anyone who has a clue? It seems it creates a require block and then evals it so that might break according to this: https://github.com/boot-clj/boot/wiki/Boot-Troubleshooting#why-isnt-require-working-in-my-pod
FYI I've published boot-fmt, a library to auto-format Clojure project from Boot. The idea is to reduce cognitive load by leaving formatting to the machine (just like gofmt
in the golang-universe). https://github.com/pesterhazy/boot-fmt
Feedback much appreciated!
I will definitely try it out this week, my team is longing for something like this. We also do some elm and after a while you get so spoiled by elm-format
yeah, another inspiration!
@pesterhazy Do you by any chance have any idea how you would configure the defui macro from om.next to get some nice output with zprint?
(defui AnimalsList
static om/IQueryParams
(params [this]
{:start 0 :end 10})
static om/IQuery
(query [this]
'[:app/title (:animals/list {:start ?start :end ?end})])
Object
(render [this]
(let [{:keys [app/title animals/list]} (om/props this)]
(dom/div nil
(dom/h2 nil title)
(apply dom/ul nil
(map
(fn [[i name]]
(dom/li nil (str i ". " name)))
list))))))
I am not sure yet how to tackle this thing 😛that's a tough one
I'd start with omitting the form (using ;!zprint {:format :skip}
)
that instructs zprint (or boot-fmt) to leave the next form alone
I 'mean the syntax looks pretty complicated (more complicated than defrecord etc.)
Yeah it is basically the same expect the static keyword @pesterhazy
I’ll play around some more with this, it should be possible
do raise an issue at https://github.com/kkinnear/zprint for better visibility
I will
slightly more detailed stack trace if that helps http://prntscr.com/dimcyn
seems like some issue with ssl handshake but i don't really know what to make of it or how to troubleshoot it
@raywillig try boot -BP
Old Java version?
Try Java 1.8
openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.10.2-b14) OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)
i don't think it's a java issue. I run a standalone jar that I made on my own machine on this server
i think the issue may be that i created a keystore so i could run jetty with a self signed certificate and maybe the jvm is somehow using that info?
A very general question about Boot: why can tasks not accept positional parameters at all? What problems would binding, say *parameters*
, to any unclaimed arguments cause?
@hlship do you mean like this: https://github.com/boot-clj/boot/issues/374#issuecomment-236973940?
I think I’m answering my own question … it allows the —
separator between tasks to be omitted, is that the case?
yeah the --
is not really seen by boot, the fact that you can use it between tasks is just a consequence of the way boot parses comand line arguments
I wanted to do this for a long time, and it indeed someone did implement a dependency resolve in clojurescript 😉 https://github.com/eginez/huckleberry
I wanted to ask here if there is some kind of "test matrix" somewhere in order to be sure that it follows the same rules as aether
actually more maven
...talking about deps