WIP: Add Mirage_job to wrap Bos actions#930
Conversation
|
(cc @samoht) |
|
This is nice. I would actually put this directly in Functoria instead of Mirage. Maybe just ask for a job in the configure/build/clean actions ? You can then remove some of the ceremony and extend the API to cover all the required bits. It also has the advantage of having more structure for those actions. For |
|
I'll try that. Most of the jobs are defined in functoria objects, so it might make sense to have a |
|
I was rather thinking of simply changing the type of |
Follow up from mirage#930
Follow up from mirage#930
Follow up from mirage#930
Follow up from mirage#930
(extracted from mirage#930)
Follow up from mirage#930
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
|
Superseeded by #1077 |
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
Initial draft implementation from @emillon (mirage#930)
|
Thanks for taking care of this @samoht ! |
This adds a module that wraps some
Bosactions to add a "dry run" mode. The goal is to expose some of these actions and test them at a high level. (this is not intended to implement a--dry-runflag)The implementation is based on the free monad pattern used in
OpamProcess.Joband explained in [this article]. A list of files is passed to the "dry run" evaluator, which is used to keep track of a static approximation of the file system. This is used for example to determine which value is returned byexists.The
(>>=)fromRresult.Ris replaced by a new one inMirage_job, which means that the conversion is pretty straightforward (that code was monadic already).As for other similar PRs I have opened, I have some questions as to how to make this not impact the API too much:
configurebehind a(**/**), but this does not feel too great.Let me know what you think. Thanks!