Closed xvw closed 3 years ago
It's really nice! I just tested https://github.com/roburio/unipi on your test_yocaml
directory and it works great!
The compilation process works quite well even if sometimes there are false negatives.
Yes, it's not dramatic at all, better to do too much than not enough!
I think it's very nice and the changes are minor too. However, even if it's not that annoying, YOCaml is not able to create compilation artifacts? Previously, the "manual" destination support allowed you to create specific files "in order to be an artifact", now it doesn't seem possible?
@gr-im It is possible to describe several generators. I had talked about it a little with @xvw who had proposed me this scenario (for example):
let () =
Yocaml_unix.execute (artifact1 >> artifact2 >> artifact3);
Yocaml_irmin.execute (Yocaml_unix) ... (final_file1 >> final_file2 >> final_file3)
Building intermediate files is just like using another generator.
On the last commit yocaml_irmin
is completely agnostic from Unix (it introduces a small modification on RUNTIME and the function Yocaml_irmin.execute
is now parametrized by Lwt_main
(which is owned by lwt.unix
).
Thanks for https://github.com/xvw/yocaml/pull/1 :)
Now, instead of just relaying on the date, if a file is candidate for generation, it compares Hash (given to the runtime) to check if the Hash changes. It reduce false-negative (and generation number)
cc @dinosaure
I suggest you review Commit By Commit. This PR introduces the possibility of constructing a RUNTIME that distinguishes between a source (ie: Unix) and a target which is an Irmin store. I have added an example. The compilation process works quite well even if sometimes there are false negatives. For example if a file has been modified but the content is the same, Yocaml will indicate that it had to rebuild the file whereas Git didn't patch anything (logical, Yocaml only relies on the date to know if a file needs to be patched, Git uses the content of the file to be patched) however, I don't think this is dramatic at all.