xhtmlboi / yocaml

YOCaml is a static site generator, mostly written in OCaml
GNU General Public License v3.0
108 stars 9 forks source link

Upgrade `yocaml` with `git-kv` and use `paf` instead of CoHTTP #33

Closed dinosaure closed 1 year ago

dinosaure commented 1 year ago

This PR has two reasons: 1) I want to lint dependencies for yocaml_irmin. Currently, we mainly need something which is able to clone/push. In such context, Irmin is a bit bigger than what we really need. Fortunately, Robur did a great project git-kv which does exactly that without the Irmin layer. The real advantage to switch from one to another is the speed (Irmin does many things that we don't really need) and dependencies 2) The second change is the deletion of CoHTTP for paf. The last one can handle the H2 protocol (despite CoHTTP) and ALPN. It provides an easy way to make a website with MirageOS (as unipi.

A minor changes was about OPAM files when I decided to remove pin-depends and directly use the same version between yocaml and derivations of it (yocaml_*). I think, such layout about package is better.

Finally, I decided to experiment conan which allows you to recognize the MIME type of a file as the file/libmagic does (from a database). I updated my dinosaure/blogger from this PR and everything works like before (but we can notice a regression about link time and performance due to conan). IF you don't want to use conan, that's fine, the project still is experimental.

xhtmlboi commented 1 year ago

So sorry for the delay in responding!

A minor changes was about OPAM files when I decided to remove pin-depends and directly use the same version between yocaml and derivations of it (yocaml_*). I think, such layout about package is better.

I don't know this pattern, which does seem better, is it documented somewhere?

About the PullRequest, a lot of it touches on something I don't know much about and I trust your experience a lot more than my ability to understand it all, so let me ask a few things. The PullRequest is, so far, doing a lot of different things and the CI doesn't seem to be getting through anymore, so would it be possible to split it into several pieces (if only to investigate the CI error more easily and probably simplify the review):

I realise that these are a lot of changes, and you are free to decline to do so, in which case the IC fix will be sufficient and I will try to do a full review as soon as possible. Thanks again for pushing YOCaml so far!

dinosaure commented 1 year ago

Close because I split this PR to some important pieces which are merged.