This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-10
Channels
- # aatree (4)
- # admin-announcements (1)
- # beginners (62)
- # boot (279)
- # business (14)
- # cider (1)
- # cljsrn (3)
- # clojure (88)
- # clojure-czech (3)
- # clojure-madison (2)
- # clojure-poland (117)
- # clojure-russia (74)
- # clojurescript (168)
- # core-async (8)
- # css (6)
- # datavis (39)
- # datomic (67)
- # devcards (2)
- # dirac (1)
- # editors (9)
- # emacs (13)
- # events (2)
- # hoplon (2)
- # jobs (9)
- # ldnclj (38)
- # lein-figwheel (9)
- # leiningen (7)
- # luminus (4)
- # off-topic (77)
- # om (114)
- # omnext (1)
- # onyx (221)
- # parinfer (10)
- # portland-or (5)
- # proton (3)
- # re-frame (24)
- # reagent (14)
- # ring-swagger (13)
@jethroksy: you probably need to use the --port
option when you start the docker container
i guess the first thing you want to try is can you connect to the repl from inside the docker container
@micha, @jethroksy , 0.0.0.0
specified as an address while connecting is equivalent to 127.0.0.1, but it's a sort of an implementation detail that people probably shouldn't rely on. Not even sure it works in all OSs/browsers
@pesterhazy: hah, I remember us having this conversation!
ah, that was you
is there blessed way to load an initial ns when the repl starts? Like lein does with user.clj
there's an :init-ns
option, @dm3
Hopefully a quick questionā¦ I can now build a uberjar with boot, but how do I include the generated JS files in the uberjar?
hmm ok.. the contents of my resources/ seems to be included in my .jar fileā¦ but NOT in the resources dir.
@thomas: how do you serve those files? if you serve them using wrap-resource
they just need to be in the jar not in any particular directory (unless you specify a prefix)
core/aot still broken. it looks like core/add-resource is having no effect. i inserted a line to print the compile path, so i can see that the files are indeed being compiled to a temp dir in ~/.boot/cache but they are not being copied to the target dir.
the only way i can get it to work is to drop the fileset stuff and just set the compile-path to the output classes directory.
@mobileink: have you tried looking at the fileset with boot aot show --fileset
?
then boot aot -a
emits a "Compiling..." message for each of the .clj files listed by boot aot show --fileset
. but no class files are produce in the output dir.
@mobileink: what does the complete task you're using look like?
@mobileink: try boot aot -a target
ok, that generates files in ./target
, although I have :target-path #{"build"}
in build.boot
Do you have a boot.properties
file that sets BOOT_EMIT_TARGET
?
as long as that file was in one of your :resource-paths
thats expected
@mobileink: the implicit syncing to target is being deprecated. use the target
task's options to influence into which directory the fileset is synced
@mobileink: that's why the files have not been saved into build
previously
is proper use of target
documented somewhere? i thought tasks were supposed to be independent, no? how do i use target's options in the aot task, or in a task I write?
@mobileink: you don'tātasks work on/interact via the fileset, syncing the fileset to the filesystem is just another thing you can do with it
aha, so the actual task carried out by target
is to configure syncing? that would make more sense - i never understood how "target" could be a task. oy. just realized i'm treating "target" as a noun - you mean it as a verb, right?
@mobileink: right, the target
task syncs a fileset to a place on the user's filesystem
tasks only care about the fileset value, which is anonymous in that it doesn't correspond to a place on disk the user or tasks need to care about
it does it
in previous versoins of boot an internal/inaccessible thing did the sync, and it still does by default
but then we realized that was the wrong default and made a target task so it can be done explicitly
ok, i'm starting to grok to general design idea (finally). working in filesets does seem to require a certain shift in thinking.
yeah it's pretty weird congrats for hanging on š
thanks for writing boot! i'm pretty optimistic about it, actually - years ago i did release engineering for a multiplatform product so got very familiar with make and autoconf stuff, later looked into cmake and various other, then had to deal with gradle, leiningen, etc. i actually spend a few weeks designing my own idea of a build tool a few years back. boot is looking pretty good.
wow, thanks!
the key thing was lifting the problem to the clojure value level
"what if the filesystem was an immutable value"
i hope other things do this in the future
i have a sad every time i need to use other build things now š¢
once I get a little more experience I expect to pitch in with some boot documentation. do you guys have one of those O'Reilly-style books in the works? not volunteering, just think boot deserves some detailed docs and handholding for noobs.
i'm not aware of one... but yeah that would be awesome
and thanks in advance for docs help
i feel like a "cookbook" treatment could maybe serve people best atm, parts of the wiki are kind of like that
but really anything you feel like contributing is most welcome
I would recommend changing "target" to "sync" or something that more obviously reflects its function. I had no idea what it was until just now.
How does a "Troubleshooting" page for the wiki sound? I'm going to write up a brief description of the problem I just had - where's my aot output? - but there's no obvious page for it on the wiki.
that sounds excellent
hi, I have played a bit more and as mentioned above I can get my JS/CSS files in my jar fileā¦ but I seem to lose the dir structure. Is there a way the dir structure can be maintained when adding file to the (uber)jar?
@jethroksy: that is far from idealā¦ I would like to deploy just one artefact ideally.
you'll need something to add the artefacts into your jvm classpath and load it from there
If you add your artifact directory to the resources path, doesn't it put it in the jar and maintain the structure?
but if boot could add the files to the (uber)jar and maintain the dir structure, wouldnāt that solve the problem?
@laforge49: it doesnāt seem to do that š
@juhoteperi: should @import "../module/_xyz"
work with sass4clj?
FYI I just added two new pages to the wiki: https://github.com/boot-clj/boot/wiki/Boot-Troubleshooting and https://github.com/boot-clj/boot/wiki/FAQ, with info on BOOT_EMIT_TARGET and the target task.
@mobileink: excellent! i added pointer to https://github.com/boot-clj/boot/wiki/Target-Directory
Regarding ^ @micha you could, but it would work only one way: either the jar works or serving it from boot works
you should be able to have the same classpath in the jar as what you have when you serve from boot
it's a feature that the files are relative to the classpath and not directly related to the files in the filesystem
Boot wouldn't release the locks on my target files even if shut down gracefully within docker
@alandipert: while we're at it, ok with you if I start adding wikipages for the predefined tasks? I've found I have to do a considerable amount of time digging around on the web to figure out how to use them, e.g. checkout (not to mention aot and target). might as well put the info on the wiki where it can be easily found.
@mobileink predefined tasks have in built docs
@mobileink eg boot repl -h
@jethroksy: That's true, and once you know what you're doing boot <task> -h is very helpful. But when you're learning - well, when I was learning, at least - usage summaries are not very helpful. As I mentioned, I've had to spend a lot of time searching the web for explanations and examples, and even then I've had to go to the source to really understand. The point of wiki docs is that you have room to actually explain things.
So as you understand something that took some effort, add it to the wiki. If it is wrong, it can be corrected. If it is write, it helps the next guy.
The thing is, the topics you have difficulty with will vary from person to person. And who will take the time to carefully document something unless they were the one having trouble reasoning it out.
So there is never any point in complaining about the lack of material in the wiki. Only with complaining about inaccurate or dated material in the wiki.
And even then, once you've confirmed that the wiki was wrong, you can fix it yourself.
For myself, I have no js background and find even the simplest things in clojurescript rather difficult. So I've written a series of demo programs. https://github.com/aatree/aademos
I was just pointing out that it was there, in case he didn't know. No complaints were made
I thought this was a complaint: As I mentioned, I've had to spend a lot of time searching the web for explanations and examples, and even then I've had to go to the source to really understand. The point of wiki docs is that you have room to actually explain things.
@laforge49, @jethrosky: didn't mean it as a complaint, just an explanation of why I want stuff on the wiki
I feel like the main turnoff for boot is that there are quite a few concepts to familiarize yourself with
The only reason why I can manage at all is because my needs are small and I've gotten a lot of help.
How many days have I lost due to the error messages coming out of clojurescript? (shudder)
@jethroksy: depends on the doc. really well written documentation goes a long way. unfortunately writing great doc is maybe even harder than writing great code. but we should try anyway.
If you do a bad job, some one else may fix or replace it. "That doc was really bad--even I can do better!"
@seancorfield: boot-expectations ..... I think I might like tests again :)
Glad to help steer you back to the light š¼
@martinklepsch: Re sass4clj, it's highly probable that there are some problems with relative imports currently, but if they work in other implementations they should also work with sass4clj (i.e. if they don't, it's a bug)
I get this in my console: GET http://localhost:3001/js/app.out/cljs_deps.js
yes.. I am very confusedā¦ but thank you for all your help so far. it has been most welcome!!!
is there a way to tell the cljs compiler where to put its output. in the cljsbuild on lein there is.
because with lein the :output-dir, :output-to, :source-map, :source-map-path, and :optimizations are all dependent on each other