-
Notifications
You must be signed in to change notification settings - Fork 470
[RFC] concurrent progn action #6937
Description
Desired Behavior
There are various situations in Dune in which we would like to run an action like (progn ) but the sequentiality ends up giving a sub-par user experience. Here are a few examples that I have in mind.
-
Running multiple unrelated programs. If you have a user action where you wish to run multiple programs and one of the programs fail, then they all collectively fail. In this situation, you will only see the first error message that is encountered, even if actions afterwards would succeed.
-
Running inline tests. In Run inline tests in parallel #1516 it is noted that errors occurring during the running of inline tests will run into the same issue as above, due to the use of
(progn ). This also means that only one error at a time can get registered for promotion. -
Diffing multiple files. There are situations where you wish to diff multiple files, but only the diffs that get run get registered for promotion. This means for the reasons above. early errors will always cause the promotion of all the diffs to be delayed.
In all of these cases, the use of (progn ) could be replaced by a new action for concurrently running a list of actions. Let us call such an action (concurrent ).
I have designed and partially specified such an action in #6933 and am open to comments about it's implementation. Since I have to add to the build system to do this, it is good to discuss the idea here first.
Another application I have in mind is that diffing multiple files like this will make directory diffing, as we wanted to do for #6648, easier to implement.
There is the question of what to name this action. I have gone for (concurrent ) in #6933.
cc @snowleopard