This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-19
Channels
- # beginners (37)
- # boot (96)
- # cider (23)
- # clara (2)
- # cljs-dev (40)
- # clojars (1)
- # clojure (149)
- # clojure-conj (1)
- # clojure-dev (2)
- # clojure-dusseldorf (5)
- # clojure-france (82)
- # clojure-italy (1)
- # clojure-nlp (1)
- # clojure-russia (13)
- # clojure-spec (24)
- # clojure-uk (62)
- # clojurescript (131)
- # core-async (13)
- # core-logic (7)
- # data-science (1)
- # datomic (10)
- # defnpodcast (3)
- # docker (4)
- # emacs (3)
- # events (4)
- # hoplon (68)
- # klipse (4)
- # leiningen (1)
- # off-topic (5)
- # om (140)
- # onyx (16)
- # pedestal (24)
- # planck (10)
- # proton (2)
- # re-frame (9)
- # reagent (4)
- # remote-jobs (1)
- # ring-swagger (16)
- # untangled (5)
- # vim (8)
- # yada (30)
what might cause this beahaviour?
clojure.lang.ExceptionInfo: Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x479cbee5 "adzerk:boot-cljs:jar:1.7.228-1 (test)"] #object[org.sonatype.aether.graph.Dependency 0x59e2d8e3 "adzerk:boot-cljs-repl:jar:0.3.0 (test)"] #object[org.sonatype.aether.graph.Dependency 0x2b72cb8a "adzerk:boot-reload:jar:0.4.8 (test)"] #object[org.sonatype.aether.graph.Dependency 0x7f8a9499 "pandeiro:boot-http:jar:0.7.2 (test)"] #object[org.sonatype.aether.graph.Dependency 0x5d43661b "com.cemerick:piggieback:jar:0.2.1 (test)"] #object[org.sonatype.aether.graph.Dependency 0x12299890 "org.clojure:tools.nrepl:jar:0.2.12 (test)"] #object[org.sonatype.aether.graph.Dependency 0x2fba3fc4 "weasel:weasel:jar:0.7.0 (test)"] #object[org.sonatype.aether.graph.Dependency 0x4bf48f6 "danielsz:boot-autoprefixer:jar:0.0.8 (test)"] #object[org.sonatype.aether.graph.Dependency 0x420a85c4 "org.clojure:clojurescript:jar:1.7.228 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x1c39680d "org.clojure:core.async:jar:0.1.346.0-17112a-alpha (compile)"] #object[org.sonatype.aether.graph.Dependency 0x62833051 "cljs-http:cljs-http:jar:0.1.39 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x1c852c0f "org.webjars.npm:react-dnd-html5-backend:jar:2.0.0 (compile)"] #object[org.sonatype.aether.graph.Dependency 0xa37aefe "org.webjars.npm:react-dnd:jar:2.1.4 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x5d99c6b5 "cuid:cuid:jar:0.1.1 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x266374ef "bidi:bidi:jar:2.0.10 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x13b3d178 "kibu:pushy:jar:0.3.6 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x24c4ddae "binaryage:devtools:jar:0.6.1 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x37fb0bed "re-frame:re-frame:jar:0.8.0 (compile)"] #object[org.sonatype.aether.graph.Dependency 0xa82c5f1 "re-com:re-com:jar:0.8.3 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x7b7fdc8 "reagent:reagent:jar:0.6.0-rc (compile)"] #object[org.sonatype.aether.graph.Dependency 0x51c693d "reagent-utils:reagent-utils:jar:0.2.0 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x6a57ae10 "deraen:boot-less:jar:0.2.1 (test)"]]
im trying to add some js externals for my project as follows:
[org.webjars.npm/react-dnd-html5-backend "2.0.0"]
[org.webjars.npm/react-dnd "2.1.4"]
@olegakbarov looks like a dependency wasn't found
That log is quite confusing
hmm.. i have one more question: how can i enable client-side routing during development with boot-http? i just want ring to do this:
(ANY "*" [] (resource-response "index.html")))
olegakbarov (serve :resource-root "")
@juhoteperi https://www.dropbox.com/s/i6siesakxcstl59/Screenshot%202016-10-19%2017.12.48.png?dl=0
Starting a new project for cljs and its been a while since I’ve looked at boot. Very excited that boot-reload now has a HUD like figwheel. But one thing I can’t find is whether it will maintain the state of the application when reloading. Looking to use re-frame for this particular app.
@kingoftheknoll Boot-reload nor Figwheel is not related to maintaining app state. Your application will need to take care of that.
Usually it is enough that you keep your app state on atom and use defonce
to store that atom.
Or just use re-frame, which does this.
@juhoteperi so there’s not such option?
@olegakbarov That message/image doesn't tell me anything
i mean this sounds trivial to me just to pass all routs down to client
i’d like to pass all requests to clientside routing while developing with boot-http
at the moment when i reload with F5 — i get a 404 from dev server
You can define custom not-found handler
like a wildcard?
(deftask run []
(comp (serve :not-found "/")
(watch)
(cljs-repl)
(reload)
(build)))
No, a function
Check boot serve --help
@juhoteperi of course that makes sense. So rather the fact that state was maintained when reloading was either the namespace wasn’t reloaded or that it was using defonce
i do not understand how cli flags map to config opts
this part is pretty confusing
@olegakbarov the long cli option maps to the keyword like this: --foop-barp
=> :foop-barp
yeah, some experiments led me to same conclusion
there is documentation here: https://github.com/boot-clj/boot/wiki/Task-Options-DSL
tho can’t figure out how to solve my problem :not-found “/“
doesn’t work 😞
@olegakbarov if you do (doc thetask)
in your repl you will be able to see the types
thanks, this makes cli opts more clear
but nevertheless i can’t figure out how to redirect all routes to client
got this for example: serve: unknown option(s): :not-found
boot.user=> (doc serve)
-------------------------
pandeiro.boot-http/serve
([& {:as *opts*, :keys [help dir handler init cleanup resource-root port httpkit silent reload nrepl]}])
Start a web server on localhost, serving resources and optionally a directory.
Listens on port 3000 by default.
Keyword Args:
:help bool Print this help info.
:dir str The directory to serve; created if doesn't exist.
:handler sym The ring handler to serve.
:init sym A function to run prior to starting the server.
:cleanup sym A function to run after the server stops.
:resource-root str The root prefix when serving resources from classpath
:port int The port to listen on. (Default: 3000)
:httpkit bool Use Http-kit server instead of Jetty
:silent bool Silent-mode (don't output anything)
:reload bool Reload modified namespaces on each request.
:nrepl edn nREPL server parameters e.g. "{:port 3001, :bind "0.0.0.0"}"
nil
seems, like boot as well as boot-http set up fine
[pandeiro/boot-http "0.7.2" :scope "test"]
lemme bump to 0.7.3
okay now
clojure.lang.ExceptionInfo: option :not-found must be of type sym
data: {:file
"/var/folders/9q/pc2svvn90m59swn642ll51br0000gn/T/boot.user8213406251709384518.clj",
:line 21}
java.lang.IllegalArgumentException: option :not-found must be of type sym
sorry guys for all these … im new to boot
what should i pass to not found et al?
needs to be a fully qualified symbol representing a handler function to call when a route is not found
no idea what it would be in my case
(serve :not-found (resource-response "index.html"))
not working tho
in case of re-frame app
i dont have a route handler or smth
yes, and the question is how to pass all serverside routes to client
i think this is pretty common usecase developing SPAs
no logic at all, i just want to send index.html and statics
all the business done clientside
So you need this logic because if the person requests /some/file/that/doesnt/exist.html
, how should it know to serve index.html
(ie, your SPA)?
so you need a ring request handler in a clojure (clj) file, which boot-http will use to handle requests for things that don't exist
boot-http is the jetty/ring server itself, right?
i mean under the hood
i felt it works much like webpack-dev-server
(which allows to pass all routes to client via single line of config 😓)
valid point
i guess i can launch my own server with boot, right?
Hello, booters(?)...
If my project's version is encoded in the build.boot
(task-options!
pom {:project 'myproject
:version "0.1.0"}
jar {:main 'myproject.core :file "myproject.jar" }
aot {:all true})
Is there a way for my app to read this info from runtime? You know, to print the version? 😉
Well it seems I can do the opposite.
That is, put (def version "1.0.0")
into myproject/src/core.clj
and then change the build.boot
to:
(require `[myproject.core]) ; for version info
(task-options!
pom {:project 'myproject
:version myproject.core/version}
jar {:main 'myproject.core :file "myproject.jar" }
aot {:all true})
Is it obvious I'm new to Clojure, not just boot? 🙃
consider like "if i call a function with argument 123 like (func 123)
how can i read that info at runtime"
@aristarchus there is also boot-semver for managing the version in a boot task, future version of that will generate a namespace like myapp.version
which will contain all the version info for your project, finishing that is on my list