Fork me on GitHub

I am using figwheel + yada. Yada is serving my index.html and I am using figwheel for everything else other than serving the index.html. I have configured figwheel as follows:

^{:open-url ""}
{:main web-client.core
 :asset-path ""}
This works as expected. However, I am curious if this is an uncommon way of using figwheel.


@tkjone You will normally want to configure yada to serve your compiled clojurescript assets because this is what you will be doing in production anyway


Nice, that is how I wanted to configure it. Is there any additional configuration required in figwheel to make this happen - or is it just telling yada to serve what figwheel builds?


thats all you have to do, just tell yada to serve the assets


Clarifying point though: If the application is a SPA, the static assets could live on S3 or some kind of CDN. If this is how production flows, would you still configure the development process to have yada serve the in this case, yada would not be doing this in production, yes?


no not neccessarily in that case


im just going thru now and i saw homebrew being the only way mentioned to get clojure on macOS. i would highly recommend mentioning the Nix package manager too, since it works more predictably the same way on macOS and any Linux and does not pollute or conflict with the user's global environment in any way. @bhauman have you ever tried Nix or NixOS? what's your main development OS, btw?


i've written 2 very short intro blog posts about Nix recently and used clojure as one of the examples in them too: 1. 2.


and here is an actual, real project with a pinned down version of clojure (and all its dependencies):


the most beautiful part of nix is that you can just get an ephemeral shell with the declared dependencies available and after you quit the shell they are virtually gone; won't interfere with the rest of the system. just run:

nix-shell -p clojure
or maybe if you use a different shell, like we do, then
nix-shell -p clojure  --run fish
for example


and if you don't want your external system bleed into your ephemeral environment, then you can say

nix-shell -p clojure fish --pure --run fish
this way you can make sure that anything you do in this shell won't depend on your local installation, hence will be reproducible on any other machine, with the same command line


@onetom You'll have to start from — good luck preaching Nix to core team.


That's a harder problem to solve, that's why I wouldn't start there.


guile scheme's guix package manager is also awesome, could be perfect match for clojure


since it's based on nix, of course it's great, but nix is a lot more practical, since it allows to share installation instructions for developers between macOS and any Linux distribution. also according to wikipedia: > GNU Guix (/ɡiːks/[2]) is a package manager. It is based on the Nix package manager with Guile Scheme APIs and specializes in providing exclusively free software. Nix provides non-free software also, if you opt-in.


As both share same API, so both can do same work. how come nix is more practical to clojurian, most of us already know scheme form SICP ?


@bhauman sometimes rebel does not show up with:

{com.bhauman/figwheel-main {:mvn/version "0.1.6-SNAPSHOT"}
                  com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}


do you know what can be? do I need to use SNAPSHOT?


oh I had another clj terminal the same folder..maybe it got confused


@richiardiandrea it should show up everytime that its able to be required, sounds like you had a classpath problem of some sort


yep it was weird, I had launched a clj in one terminal and then a figwheel-main REPL with rebel in another one


maybe clj cached the paths in a way that conflicted? but I don't see how that could happen


well...yeah...I do not know but for sure there is some caching going on there


@onetom thanks for the info I just read your first blog post, Nix looks good, I'd have to use it a while before I could really suggest it in earnest.


Of course you should try it first! 🙂 So I guess it means your main development OS is macOS than and that's why you are recommending brew install clojure or you just echoed what the clojure guide say about macOS installation?


Yes both are true, I link to the getting started instructions and then inlined instructions for MacOS as it doesn't work on Windows yet.