Fork me on GitHub
#perun
<
2017-04-04
>
mitchelkuijpers08:04:03

Hi can anyone tell me how to get perun to hot reload all code, it seems to work really flaky or it sort of hot reloads

bhagany17:04:47

Hi @mitchelkuijpers - When used with watch, Perun should reload things that changed. Can you share more details?

mitchelkuijpers17:04:13

It does not seem to reload all clojure code

bhagany18:04:06

I'm going to need some specifics in order to help

mitchelkuijpers18:04:14

We have a core.cljs in which a function get's called, and that uses a function which returns hiccup from another ns if we change the arity of that function and then the calling of that function it will forever say that the arity is wrong

bhagany18:04:01

ah, okay, so this is cljs. Perun doesn't deal directly with with reloading front end code - are you using boot-reload?

mitchelkuijpers18:04:30

Oh lol I mean core.clj

bhagany18:04:35

okay, so just so I understand, you've got something like (ns your-project.core (:require [your-project.hiccup :refer [get-hiccup])), and when you change the get-hiccup fn, it doesn't get reloaded?

bhagany18:04:25

okay, yeah, that should work. Are you using a fn in your-project.core as a :renderer argument to a Perun task?

mitchelkuijpers18:04:42

We use it mostly with the static task for now

mitchelkuijpers18:04:34

Butt I'll try it out tommorow some more, I created a start point for our ux designer. Maybe he is doing something weird. I was mostly asking because it might have been a wrong assumption that clj code would get reloaded automatically

bhagany18:04:37

No, that is a correct assumption. I will make a minimal reproduction, and if I can't get it to fail, we can compare to see what is different.

mitchelkuijpers19:04:21

@bhagany I think we are using the newest snapshot so maybe that is the issue

bhagany19:04:45

I will use that for my reproduction attempt, then

bhagany19:04:53

but in general, the snapshot should be okay

mitchelkuijpers19:04:27

Awesome, I'll be gone for now so no rush at all. If you want I can try to make a reproduction tomorrow

bhagany19:04:23

If I can't get to it by then, that would be most welcome