Fork me on GitHub

hi all, I've been using the excellent new Polylith architecture along with figwheel-main and I've come across a bit of an issue: fighweel's file watching does not seem to work with symlinks. The way Polylith works is that you have "components" separated out into individual folders and then you have their source symlinked all together into your development environment src folder. So my src dir looks like this:

.../src/com/example $ ll
total 12
lrwxrwxrwx 1 miridius miridius  58 Nov  4 21:41 api -> ../../../../../components/api/src/com/example/api
lrwxrwxrwx 1 miridius miridius  59 Nov  4 13:36 client -> ../../../../../bases/client/src/com/example/client
lrwxrwxrwx 1 miridius miridius  64 Nov  4 20:23 config -> ../../../../../components/config/src/com/example/config
lrwxrwxrwx 1 miridius miridius  64 Nov  4 14:56 public -> ../../../../../components/public/src/com/example/public
lrwxrwxrwx 1 miridius miridius  59 Nov  5 14:37 server -> ../../../../../bases/server/src/com/example/server
lrwxrwxrwx 1 miridius miridius  56 Nov  4 21:49 ui -> ../../../../../components/ui/src/com/example/ui
Everything works fine except that if I change a file in one of those symlinked directories, figwheel does not hotreload. I've tried putting a source file directly in the shared src directory and that works, so it's definitely the links. I did find a workaround which was adding "../../components/ui/src" to my :watch-dirs, which actually works 🙂 but figwheel-main compains quite a lot about watching a directory which is not on the classpath. Any suggestions? By the way I had this issue initially with lein-figwheel and moved to figwheel-main in the hopes that would solve it, but no luck.

Lyn Headley18:11:44

very impressed by figwheel-main documentation. This project is treating itself as THE gateway to clojurescript -- as well it should!

Lyn Headley23:11:18

upgraded from figwheel to figwheel-main with nary a hitch!

Lyn Headley23:11:37

cider works too.


Did you start with a template or a project that you added figwheel-main to?

Lyn Headley17:11:49

started with an existing figwheel project.


Can you list out the steps that you followed? I have never been able to do it with an existing project. Always worked with a template.


Cool! Thanks for sharing. I will try this out.