This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-21
Channels
- # admin-announcements (4)
- # beginners (41)
- # boot (46)
- # cider (8)
- # clojure (132)
- # clojure-austin (15)
- # clojure-belgium (3)
- # clojure-greece (3)
- # clojure-hk (1)
- # clojure-mexico (4)
- # clojure-quebec (5)
- # clojure-russia (46)
- # clojure-spec (225)
- # clojure-taiwan (1)
- # clojure-uk (17)
- # clojurescript (46)
- # clojurewerkz (1)
- # core-async (28)
- # cursive (9)
- # datascript (3)
- # datomic (5)
- # defnpodcast (42)
- # devcards (60)
- # emacs (27)
- # hoplon (7)
- # lein-figwheel (5)
- # leiningen (12)
- # mount (8)
- # om (13)
- # play-clj (2)
- # reagent (47)
- # rethinkdb (5)
- # ring-swagger (7)
- # spacemacs (9)
- # specter (12)
- # testing (1)
- # untangled (1)
- # vim (11)
- # yada (31)
Anyone have a hint for me on why boot.cljs.main is missing? (or what it is)
devcards.html:16 goog.require could not find: boot.cljs.main772goog.logToConsole_ @ base.js:639goog.require @ base.js:679(anonymous function) @ devcards.html:16
devcards.html:16 Uncaught Error: goog.require could not find: boot.cljs.main772goog.require @ base.js:681(anonymous function) @ devcards.html:16
Trying to follow @jgdavey https://github.com/hashrocket/boot_devcards_example, but I'm missing some important step it seems.
My build.boot is here: https://github.com/timothypratley/voterx/blob/master/build.bootHmmm specifying a different asset path {:asset-path "js/devcards.out"} seemed to do the trick.
Yes the file devcards.cljs.edn
gives location and name to your .out
folder
Nice website btw !
thanks 🙂
morning 👋 🙂
In my build.boot I have all the version information defined. I would like to be able to access it at runtime and wonder what the best practice is for that.
write a version.properties file to the classpath
either via a boot task or you can also put it there by hand and read from it when setting up pom
task
you can also use EDN, doesn't really matter I guess
Ah, I could write a boot task which /creates/ the properties file? That sounds better, I guess.
(deftask spit-version
[v version VERSION str "Version string"]
(with-pre-wrap fs
(let [d (tmp-dir!)]
(spit (io/file d "version.edn") (pr-str {:version version}))
(-> (add-resource fs d) commit!))
@ska: this probably doesn't work but I guess you get the ideabe aware that this is a build step you have to do every time, the file does not stick around as it is not actually added to your resources/
directory
Hm, OTOH, I already find the pom.properties for my own module in the uberjar. Maybe that is already sufficient?
You can use that as well but make sure you use the right pom.properties file, you might have many via dependencies
I remember using some library that made assumptions about pom.properties and that didn't work out very well 🙂
I plan to derive the path of the pom.properties
from my own namespace. Currently fighting with classpath in my REPL which is not what I expect 😕
Hmm, kinda yucky: Am now accessing the resource "META-INF/maven/[[my-group-id]]/[[my-artifact-id]]/pom.properties" directly, having all of it as a hard-coded string.
How would I remove my own clj files from the uberjar? Anything built-in? Or would that be a sift task?
sift
would work. How did you add them in the first place? If you used :resource-paths
try :source-paths
— files in :source-paths
don't have the output role, i.e. they won't end up in an artifact
so when you build a regular jar, you usually want them in :resource-paths
for uberjar you might want something different.
I am building an uberjar and if I don't have :resource-paths
set to src
the executable JAR can not find the main class.
No, all is well now. Changed :resource-paths
to just :source-paths
and it seems to work the way I want it to.
Thanks for your help and patience, @martinklepsch !!
yeah, aot
should produce files with output role
BTW, the snippet on https://github.com/boot-clj/boot/wiki/Snippets does not work for me: I must put aot
before uber
as core.async does not compile. It fails with some cljs error message.
@ska: feel free to edit, generally seems sane to me to do AOT before uber
Yeah, I only want to AOT my stuff for which I know that it should work. After uber, (aot)
would compile all my dependencies, if I understood correctly. How can I be sure that that would work without knowing all those deps.
@ska: if you supply a list of namespaces to the aot
task it should only compile those, did you do that?
(it's done like that in the Snippet)
Oh, now I see. I have :all true
in my call to (aot)
. So, in that snippet it doesn't make any difference at all.
This channel might find this valuable http://eclipsesource.com/blogs/2016/07/20/running-node-js-on-the-jvm/
@dominicm: interesting, that's an approach i haven't seen yet
@dominicm: that's cool stuff
Yeah, I thought so too. I'd like to see a postcss pipeline, I have an upcoming project where I might be able to take some time to build a boot task to handle postcss.
I am so happy to be a boot-er , I learned a lot here 😄
The optional map at the moment has the following keys:
- name the name used in the logs to identify this process
- timeout the time that is waited before exiting from parking
(never ever ever block forever, thanks <@U055HMK9L>)"
[in-ch proc & [{:keys [name timeout]}]]
(let [kill-ch (chan)
timeout (async/timeout (or timeout 10000))]
(go-loop [] ...
and Jessica of course 😄 https://www.infoq.com/presentations/concurrency-tools-jvm