This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (3)
- # beginners (165)
- # boot (123)
- # cider (106)
- # clara (1)
- # cljsrn (20)
- # clojure (199)
- # clojure-canada (2)
- # clojure-dev (3)
- # clojure-poland (29)
- # clojure-russia (7)
- # clojure-taiwan (2)
- # clojurescript (487)
- # cursive (25)
- # datavis (89)
- # datomic (26)
- # gorilla (2)
- # hoplon (15)
- # ldnclj (12)
- # lein-figwheel (9)
- # leiningen (2)
- # liberator (1)
- # off-topic (25)
- # om (380)
- # onyx (26)
- # parinfer (52)
- # portland-or (12)
- # re-frame (28)
- # reagent (132)
If I want to have boot-reload reload files work with a remote PC then I have to use
:ws-host option, right? Or is there anything else I need to use?
I seem to get
(client/connect " in the file generated by
boot-reload even though I've set
:ws-host, so maybe something else is needed as well?
@juhoteperi: sorry to hassle you, but since you have the most code in
boot-reload you could tell me what should I modify to get
:ws-host working? I can't seem to find where that file with
client/connect is generated.
My use case is I want reload to work on a different computer the boot is running on; I understood
:ws-host option to be meant for that, but it doesn't seem to work. I'm happy to add this myself if it's simple, but I couldn't figure out how
application.out/adzerk/boot_reload.cljs is generated so I could modify it.
It serialises forms in
write-cljs! and the url is a return from
start-server!, so I'll just have to make sure it returns the once with
merge-env! will work, not
set-env, yes? In that case how should I avoid duplicate entries in dependencies? Just make them sets and union them?
update-dependencies! should be in the function I return (`identity` here), yes? Though I'm not sure what signature it should have
@jaen: commit! syncs fileset with filesystem, if fileset isn’t changed there is no need for commit.
Right. I should probably read docs someday to not ask such stupid questions, I've been using boot a bit in the blind.
How worried should I be with
Warning: version conflict detected: commons-codec version changes from 1.6 to 1.10?
@martinklepsch: suppose you have two dependencies in your declared deps, A and B. A and B both depend on C, but different versions. aether will try to use the version of C (the transitive dep) that is "closest" to the declared deps, i.e. shortest path in the dependency graph. but if the path from your project to C via A and B are the same length, it will choose the one you declare first, i think
so if you have a lot of dependencies you can get unpredictable behavior if you use an unordered collection for the deps
boot.user=> (require 'taoensso.carmine) java.io.FileNotFoundException: Could not locate taoensso/carmine__init.class or taoensso/carmine.clj on classpath. boot.user=> (merge-env! :dependencies '[[com.taoensso/carmine "2.12.0"]]) Warning: version conflict detected: commons-codec version changes from 1.6 to 1.10 nil boot.user=> (require 'taoensso.carmine) clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: No matching method: sha1Hex, compiling:(taoensso/carmine.clj:149:29) java.lang.IllegalArgumentException: No matching method: sha1Hex boot.user=>
that commons-codec jar had already been pulled in via transitive deps from a dependency you added earlier
So there's nothing you can do apart from restarting in that case? Is this related to what you mentioned earlier that boot is a single JVM?
like you can make a pod that has your existing deps with the carmine dep added, and it will resolve transitive deps against the full set ofdependencies, so it will choose the right one
so in the clojure way, instead of mutating the core pod adding a dependency, you can create a new pod with the new dependencies
@micha: i just tried to preload the datomic.api into boot-test and that way my test run time is: > 0.3s * on a 2.7GHz i7 MBP * using the recommended BOOT_JVM_OPTIONS * Clojure 1.7 * Java 8 * BOOT_VERSION=2.5.0-SNAPSHOT (i ran this test: https://gist.github.com/bostonaholic/30e31f4620804632d3c8)
@micha: any examples of doing that anywhere? I guess not since it's so fresh, but doesn't hurt to ask.
@micha: have any thoughts wrt. java.io.File serialization? https://github.com/boot-clj/boot/issues/250
@onetom: I think a PR to boot test to supply extra namespaces for preloading might be appropriate: https://github.com/adzerk-oss/boot-test/blob/master/src/adzerk/boot_test.clj#L48
@martinklepsch: sure, we touched on this point briefly with micha a few days ago, but i consider it being beyond my capabilities to design such a feature well (since im not very fluent in
resolve and namespaced symbols and such basic stuff yet)
we want to be able to pass objects that don't necessarily implement Serializable interface
@onetom: no need for resolve. just add an option to the test task, parameterize the
init fn and add additional require calls for the namespaces supplied to the option: https://github.com/adzerk-oss/boot-test/blob/master/src/adzerk/boot_test.clj#L14
@martinklepsch: yes, without preloading it takes 1.5s instead of 0.3s... that's exactly what it takes to make me a fall into the tolerating category as https://en.wikipedia.org/wiki/Apdex defines it
@micha: maybe after u released 2.5
we are using too many experimental stuff already.
i'm yet to upload our example of a
loop-tpl bug in hoplon-6.0.0-alpha11
@micha: I see, but that's limited to just the REPL right now, yes? So it won't help me with Clojurescript compilation for example, right?
jaen: you probably want to use
boot show -p to see how the commons-codec conflict arises
Hm, that's an idea for a workaround, but sooner or later I will end with multiple exclusions if I keep hot-updating dependencies like that. Not saying this has to be solved right now, but maybe that's an use case that could be considered for the future (so tasks would run in pods that can be killed to update deps). Such seemingly automagical dependency upgrade feels really cool.
I just pushed this but no notification here 😕
I can't remember if it's on purpose or not.
@micha: Should I setup an slack webhook for the
adzerk-oss github org or that would be too much noise here?
im super impressed with this rolling pod-pool solution, btw it's a serious relief for me im trying to integrate boot-test with visual studio code now, because the test runner functionality in sublime was not really nice.
not much, but it has parinfer support for a few days now and the syntax highlighting is part of it
i had to hack the default clojure extension though to register the
.boot file extensions:
sed -i '' -e '/extensions/r/"extensions": [".clj", ".cljs", ".cljx", ".clojure", ".edn", ".cljs.hl", ".boot"],/' '/Applications/Visual Studio Code.app/Contents/resources/app/extensions/clojure/package.json'
If someone writes a plugin to debug Clojure with it, it could probably be a nice editor for noobs to start out with.
i keep falling back to either prints if there is no good test suite setup, but otherwise if the test suite can ran individual tests then i prefer to just evolve a mini example in form of a test
I cannot into tests to be honest. And I find Cursive's debugger to be invaluable in helping me understand the code. When I get a random
cannot cast to IFn I wouldn't be able to understand what happened if not for the debugger.
i've learnt the most from test suites, so that's why i like them, but it's indeed quite hard work to produce good tests.
Yeah, testing is hard. The worse thing is it's hard enough for me that I usually go "meh, I'll try testing next time". Each time.