perun

Discuss perun static site generator
mitchelkuijpers 2017-04-04T08:06:03.177350Z

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

bhagany 2017-04-04T17:42:47.017260Z

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

mitchelkuijpers 2017-04-04T17:45:13.067138Z

It does not seem to reload all clojure code

bhagany 2017-04-04T18:02:06.431648Z

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

mitchelkuijpers 2017-04-04T18:09:14.584775Z

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

bhagany 2017-04-04T18:17:01.747316Z

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

mitchelkuijpers 2017-04-04T18:45:30.357774Z

Oh :lol: I mean core.clj

mitchelkuijpers 2017-04-04T18:45:31.358165Z

Sorry

bhagany 2017-04-04T18:51:35.488726Z

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?

mitchelkuijpers 2017-04-04T18:52:59.518538Z

Yes

bhagany 2017-04-04T18:54:25.548752Z

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

mitchelkuijpers 2017-04-04T18:55:48.578425Z

Yes

mitchelkuijpers 2017-04-04T18:57:42.619125Z

We use it mostly with the static task for now

mitchelkuijpers 2017-04-04T18:58:34.637491Z

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

bhagany 2017-04-04T18:59:37.659544Z

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.

mitchelkuijpers 2017-04-04T19:00:21.675820Z

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

bhagany 2017-04-04T19:00:45.684715Z

I will use that for my reproduction attempt, then

bhagany 2017-04-04T19:00:53.687624Z

but in general, the snapshot should be okay

mitchelkuijpers 2017-04-04T19:01:27.699789Z

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

bhagany 2017-04-04T19:02:23.719568Z

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