Skip to content

[RFC] concurrent progn action #6937

@Alizter

Description

@Alizter

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.

  1. 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.

  2. 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.

  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalRFC's that are awaiting discussion to be accepted or rejected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions