Fork me on GitHub
#cryogen
<
2020-10-27
>
dorab00:10:07

I took a quick look at #149. In my opinion, the current approach seems better than Alternative solution 1 and possibly also Alternative solution 2. However, I am not familiar enough with the cryogen-core code to comment on the unintended consequences. My feeling is that doing a "smart compilation" (compiling only those files that need to be - including dependencies) is a better approach than just compiling only the files that are changed. Because it can leave the blog in an inconsistent state (as you note, and only in dev). Is there any code already in cryogen that can generate the dependencies? How do other static site generators deal with this issue?

👍 3
❤️ 3
Jakub HolĂ˝ (HolyJak)23:10:31

I have updated https://github.com/cryogen-project/cryogen-core/pull/149 and it is ready for testing and merging, in my opinion. I have simplified it and modified the watcher so that it has a new function which passes the changeset to the callback, which eventually ends up as a new argument to compile-assets .

Jakub HolĂ˝ (HolyJak)23:10:47

> My feeling is that doing a "smart compilation" (compiling only those files that need to be - including dependencies) is a better approach than just compiling only the files that are changed. Because it can leave the blog in an inconsistent state (as you note, and only in dev). Ideally, yes. But for dev I do not see it as a problem - I am typically working on a single page / post and don't care about prev/next links, home page etc. And I always do a full compile via a CI server to deploy. I am not sure the complexity of ensuring we have all the dependencies is worth it (we will need to maintian the code...) But maybe I am too pessimistic...