This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-18
Channels
- # admin-announcements (3)
- # alda (1)
- # boot (85)
- # capetown (4)
- # cider (10)
- # clara (16)
- # cljsrn (3)
- # clojars (35)
- # clojure (83)
- # clojure-austin (8)
- # clojure-brasil (4)
- # clojure-canada (16)
- # clojure-greece (2)
- # clojure-ireland (7)
- # clojure-russia (23)
- # clojure-spec (22)
- # clojure-uk (151)
- # clojurescript (97)
- # core-async (10)
- # cursive (1)
- # datascript (7)
- # datomic (21)
- # defnpodcast (13)
- # devcards (3)
- # emacs (4)
- # events (3)
- # hoplon (18)
- # juxt (4)
- # leiningen (7)
- # mount (4)
- # off-topic (2)
- # om (1)
- # onyx (30)
- # planck (6)
- # proton (81)
- # re-frame (3)
- # reagent (9)
- # rum (10)
- # spacemacs (1)
- # specter (6)
- # testing (7)
- # untangled (66)
- # vim (84)
- # yada (23)
@anmonteiro what are you trying to do?
is there an easy way to configure cider (installed from elpa) to run with boot instead of lein ??
@avabinary: since cider 0.12.0, there is no need additional configuration to jackin boot-clj repl.
ok @ajchemist thanks for your input, I'll download the latest cider
@avabinary: I personally recommend use exact version 0.12.0 of cider, no latest melpa version.
@flyboarder: trying to get my doo
tests to find the node_modules
folder with boot-cljs-test
You probably want to add the path to resources or assets within your test task
@flyboarder: I did that
the problem is that Boot creates managed temp dirs for each thing
so node_modules
ends up in a tmp dir, the result of CLJS compilation in another
so relative paths are not resolved
@anmonteiro: ok, almost 6am here will get back to this in a few hrs after sleep
@flyboarder: hah, go ahead, I can wait 馃檪
Maybe someone else will have some insight in the mean time :)
@anmonteiro: if you add node_modules
with the same fileset role as the CLJS compilation results they should end up in the same directory
I guess that's resource
instead of asset
@martinklepsch: Oh that might get me somewhere. I didn鈥檛 read about roles yet
I suppose boot-cljs-test
adds it as source
?
dunno, I'd expect resource but you should check
@martinklepsch: so I add it as source
(deftask testing []
(set-env! :source-paths #(conj % "src/test"))
identity)
It's relying a bit on internals, really whatever looks for files on the filesystem should look at the classpath instead (doo I guess)
but this is not what I鈥檓 looking for, is it?
I want to know what role the CLJS compilation has, right?
yeah, I think the cljs compilation results will get added as resource
gotcha
just try that and if it doesn't work try source
, there are only for options 馃槃
@martinklepsch: the problem is that boot-cljs-test
actually uses the filesystem dir instead of the classpath
https://github.com/crisptrutski/boot-cljs-test/blob/master/src/crisptrutski/boot_cljs_test.clj#L87-L93
(alternatively grep for add-
in boot-cljs :)
@martinklepsch: yep: https://github.com/adzerk-oss/boot-cljs/blob/master/src/adzerk/boot_cljs.clj#L231
trying that ASAP
The issue is that doo
needs a directory because it runs JS which can't use the classpath...
I guess one option could be to create a tmpdir in boot-cljs-test and link the fileset contents there, then using this dir as input for doo
not sure if that would work 馃檪
that makes sense. Let鈥檚 see if adding this as a resource can solve my issue first
Hi! I just recognized in my dev environment that I am still on Clojure 1.7.0 in a boot project and I think, I tracked it down to my ~/.boot/boot.properties
which defined the appropriate ENV var. Am I correct in assuming (after reading https://github.com/boot-clj/boot/wiki/Setting-Clojure-version) that I need to define the dependency on 1.8.0 in my build.boot
and boot.properties
files in my project?
@ska: yes that is correct
@martinklepsch: Thanks for the prompt reply! Will that change in the future?
Boot may run multiple versions of Clojure, the one in boot.properties
is used as default, the one in build.boot
will be added as dependency
@ska: No plans of changing that as far as I'm aware
Leaves room for subtle errors for a forgetful person like me. But I will assume, there are very valid reasons to separate the two, even if I don't see them right now. 馃槈 Anyhow, thanks again.
@ska: Boot runs a lot of things (including the repl) in pods, which are isolated Clojure runtimes.
The version of Clojure that's used for these pods is defined via boot.properties
, via build.boot
you can also add a dependency on Clojure or load a different version although it's generally recommended to keep these in sync
Too bad. Cider does not pick up my checked in ./boot
in the project but the one on my $PATH
. I can still start the REPL from the command line.
All I can help with is https://github.com/boot-clj/boot/wiki/Cider-REPL and that I've head that Cider 0.12 supposedly works out of the box with boot
@martinklepsch: adding the thing as a resource 鈥渏ust works鈥濃劉
thanks a lot!
@anmonteiro: please open an issue on boot-cljs-test
so it's not forgotten 馃檪
@anmonteiro: welcome as well 馃檪
@martinklepsch: what should the issue contain? I鈥檓 not sure I understood what the problem is with boot-cljs-test
given that this works
The issue is that this takes only one temp dir and not all of the temp dirs representing the fileset.
The directory passed to doo
should at least contain all output-files
of the fileset and not just the files that have the same role as out-file
in that snippet
gotcha
@martinklepsch: actually that might exist already
at least it鈥檚 a similar thing
actually @juhoteperi even seems to have a WIP branch to fix this issue https://github.com/Deraen/boot-cljs-test/commit/e7493432f6c41224af6757707874de736de15ddb
Yeah just saw this as well
@anmonteiro do you now what npm install
does exactly? could re replicate the basics in Clojure? I think a webjars-based approach (as @juhoteperi suggested) won't work because it doesn't mirror npm but does on-demand builds.
If we could replicate it we could essentially just create node_modules
inside the fileset
@martinklepsch: I鈥檓 not that familiar with npm
, no
I think the big difference with maven etc. is that npm modules are installed recursively (ie. each submodule has a node_modules
directory. So using different modules versions is easy (as long as they don't have to share state), at the cost of duplication (which is ok since js files are small usually).
Can I run one boot command to start both a clj and cljs repl that I can connect to separately? Alternatively, could I turn the clj repl into a cljs repl? My one-run dev task looks like this:
(comp (watch) (start-app :port port) (reload :ids #{"js/main鈥潁) (cljs-repl :ids #{"js/main鈥潁) (cljs :ids #{"js/main鈥潁) (target) (boot.task.built-in/speak))
@petrus: if you鈥檙e using emacs cider, I鈥檝e made a contribution to boot-cljs-repl
exactly for this purpose
instead of using the cljs-repl
task, use cljs-repl-env
Btw. Cljs :preloads
works with with Boot-cljs and recent Cljs: https://github.com/Deraen/saapas/commit/c70544dfd43cf73036b98b2aa3c45af1032c912c
does anyone know how to configure boot to serve anything regardless of the URL? this for a single page application
using boot-http here
treat for example localhost/index and localhost/something/else the same