This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-08
Channels
- # admin-announcements (19)
- # announcements (1)
- # beginners (70)
- # boot (192)
- # braid-chat (55)
- # cider (3)
- # cljs-dev (42)
- # cljsjs (2)
- # cljsrn (25)
- # clojars (23)
- # clojure (162)
- # clojure-brasil (3)
- # clojure-czech (18)
- # clojure-russia (10)
- # clojurecup (3)
- # clojurescript (63)
- # code-reviews (6)
- # community-development (340)
- # core-async (7)
- # cursive (4)
- # datomic (20)
- # events (2)
- # funcool (3)
- # hoplon (20)
- # jobs (33)
- # ldnclj (11)
- # lein-figwheel (9)
- # leiningen (6)
- # off-topic (1)
- # om (79)
- # proton (4)
- # re-frame (39)
- # ring-swagger (4)
- # slack-help (2)
- # yada (2)
How do I compile Clojurescript for production?
@dave: https://github.com/adzerk-oss/boot-clj-docker-image/blob/master/Dockerfile#L30
@jethroksy: it probably just haven't updated (but the README explains how to use another version).
@nha: his latest commit seems to suggest he wants it to pull the latest version though
https://github.com/adzerk-oss/boot-clj-docker-image/commit/a25530a9d8f74e027df3bad56f2ef720a0a4c30d
seems like ideally it'd be better to programatically generate BOOT_VERSION
and BOOT_CLOJURE_VERSION
, perhaps with boot -BPV | sed ...
(i'm terrible at bash)
@danielgrosse: optimizations :advanced
Check the clojurescript Compiler Wiki for more Information :)
When I do this, the whole compiled files are also copied to target. How can I generate a clean package for deployment?
@jethroksy: whoops -- yeah, that was totally unintentional. we do want it to pull in the latest version, not hard-code BOOT_VERSION and BOOT_CLOJURE_VERSION
@danielgrosse: the sift
task can help with that. boot sift -h
β combining --include
and --invert
will exclude entries from the fileset
for debugging try a line like boot build sift --invert --include "app.out" show --fileset
where build
is the task to build your app. you'll likely need to adjust "app.out"
.
if all shebangs are of the form #!/usr/bin/env boot
, why get the base name for "boot" here? https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/main.clj#L84-L91
as the boot path is set incorrectly on NixOS it breaks all shebang scripts (not least because we can't use the program reported by the path)
@socksy: that logic is related to shebang difference between mac and linux - see 2nd to last comment on https://github.com/boot-clj/boot/issues/105
which on NixOS is being set in a .boot-wrapped file (??? no idea if this is a NixOS only thing, can't see it in the NixPkg description), which is not the path to boot
/usr/bin/env boot
exists, but this shebang function only returns if the file is /usr/bin/env .boot-wrapped
in the shebang case, isn't arg0 the name of the shebang script?
i'd have to warm up on the code again, but i know at least some of this code is about finding the path of the script being executed. presumably the path to boot itself was already found
if you look at https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/main.clj#L84-L91 , arg
is the path of the script being executed, but the base-path
is just derived from (System/getProperty "boot.app.path")
looks like its set in https://github.com/boot-clj/boot/blob/master/head.sh - is the logic there wrong?
that property needs to be set to differentiate boot shebang scripts from other shebang scripts
but the property is set as .boot-wrapped on my machine. All that is in the boot executable is the following:
#! /nix/store/7d2g3bvmbi5ps3vlkl54h7d7yasc4ynv-bash-4.3-p42/bin/bash -e
export JAVA_HOME=/nix/store/2h6lgjp9lyw8ifjiv1cwpyk0dm053mgc-openjdk-8u76b00
export PATH=/nix/store/2h6lgjp9lyw8ifjiv1cwpyk0dm053mgc-openjdk-8u76b00/bin${PATH:+:}$PATH
exec -a "$0" /nix/store/wm2101r6iwas1bxhhs95727s0cmqwivc-boot-2.4.2/bin/.boot-wrapped "${extraFlagsArray[@]}" "$@"
i could if i could find where whomever made this package hacked boot.sh in the first place
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/build-managers/boot/builder.sh <- looks like the file comes from boot and nix script is just sed'ing it
(only difference between head.sh and it is the patched shebang line to point at the real bash)
sets default value for BOOT_JAVA_COMMAND
to nix location for java, instead of just java
@ragge: this is sweet, we should add a note to the README for the nixos package, you think?
@micha: mind taking a squiz at https://github.com/boot-clj/boot/pull/380?
@micha: sure, can do. boot is actually a quite pleasant nix citizen the way the script is currently written
thanks - just curious at appetite to add the feature to core, or help to do this as a library
i just added the ^{:boot/from :technomancy/leiningen} really
and looks like a fudged the whitespace there a bit >_<
awesome - this is last piece needed to get another shop over to all-boot-all-the-time
haha, TIL
just pushed the scope anyway
βsymmetry"
@crisptrutski: this won't be usable when boot loads its own dependencies, is that a problem?
in my use case thatβs fine - using secure repo only for non-clojars deps
vector of file path strings
does this mean i qualify for free stickers now? π
not quite sure what you mean with the var - would I be reading it in App.java before the boot.aether
shimming?
so just another way to set it, not a solution for an initial pull
you'll see in boot.aether namespace where we handle the BOOT_CLOJARS_REPO env var for example
not quite sure how that chicken/egg would work seeing as aether is another jar
@crisptrutski: if you feel like it at addition to the changelog would be great π
yessirre - wiki too
@micha: updated, but super naive (should perhaps be delayed?)
also perhaps youβd prefer a PR to your 2.6.0-SNAPSHOT branch?
@crisptrutski: PR to 2.6.0-SNAPSHOT would be ideal, if you don't mind
reopening this PR is the ideal excuse for my first push to a boot repo that isnβt a fork π
rebase on the tag instead of the branch
tricky git
Iβm off, have an awesome weekend all you bootaneers
@micha: thanks for all the awesome improvement youβve been knocking out, being so patient and helpful, and for the wings
when i run docker run -it adzerk/boot-clj repl
the first time, it downloads all the dependencies
when i run it the second time, I was expecting it to pick up the downloaded dependencies, but it redownloads all the dependencies for my project and for boot again
I was under the impression that ENV BOOT_LOCAL_REPO /m2
and this would do the caching:
# download & install deps, cache REPL and web deps
RUN /usr/bin/boot web -s doesnt/exist repl -e '(System/exit 0)' && rm -rf target
@jethroksy: if you want to keep the m2 across containers, you may consider making m2 a "shared volume"
otherwise each container has its own m2
seeing a strange thing:
(println
(pod/with-eval-in cpod
(let [x (confetti.s3-deploy/dir->file-maps ( ~dir))]
(println x)
x)))
this first prints x but then the outer println seems to receive nil
does this make sense to anyone?
ohhhh!
there are file objects
problem solved, thanks!
btw, did you have any more thoughts about the object passing between pods? I was thinking that the send!
stuff is somewhat related and probably a solution should consider both problems?
the process would be identical to this: https://github.com/tailrecursion/cljson/blob/master/src/clj/tailrecursion/cljson.clj
primitive object arrays ideal probly
I see. so the only problem really is passing stuff from clojure and up because this isn't shared between classloaders
yeah clojure protocol interfaces and classes are created dynamically and are local to a single clojure runtime
if you pass a clojure object, that object is an instance of a class that is unknown to other clojure runtimes
yeah, I think I'm beginning to understand
if the expression you're evaling is too large then you get an error from the JVM, because there is a limit to how large the bytecode for a method can be
you mean things like ~big-data
?
I understand now, so these two things aren't actually as related as I thought they are π
Should boot-cljs build identifiers start from 0 or 1? @martinklepsch did you have an opinion on this π?
Ha! Three commits in one minute. Vimagit is great.
@juhoteperi: build identifiers? π
the number in version after -
I'm usually using -0
for inital
I think cljsjs also usually has -0
so i just upgraded all my boot infrastructure thus https://www.refheap.com/f95a6b757d3bfc307492515ca and it's mostly working fine, except that if i try to start a cljs-repl from the command-line with boot repl -c
... (start-repl)
then my target
directory gets emptied by the boot repl -c
and i lose all the cljs/less compiled resources. if i connect from CIDER the cljs-repl works just fine ... any idea what i've borked ?
@mccraigmccraig: which version of boot?
@micha: 2.5.5 on clj 1.7.0
@micha oh sorry, hi π
@mccraigmccraig: do you have BOOT_EMIT_TARGET=no
set?
@micha no... shd i ?
@mccraigmccraig I had the same issue and setting BOOT_EMIT_TARGET=no worked for me