I’d like to condition the execution of a task on the success of another task. For example, I’d like to avoid checking (and displaying message for) the types of the arguments of a function call if no function with the specified name exists.

Submitted by Vlad Vergu on 9 July 2013 at 01:52

On 9 July 2013 at 01:57 Guido Wachsmuth commented:

You can pass dependencies to the task creators.


On 9 July 2013 at 02:00 Vlad Vergu commented:

Say i have the following:


def-task := <lookup-def(|ctx)> name;
calc-task := <type-of(|ctx, def-task)> term;
<task-create-error-on-failure(|ctx, calc-task, “incompatible arguments”)> call

If def-task fails, then the error is present. I want the error to be present only if calc-task fails not if it’s dependencies fail.

I.e. there is no difference between task failed and task failed because it has unmet dependencies.


On 9 July 2013 at 02:08 Guido Wachsmuth commented:

I see, this is indeed an issue. This requires to distinguish failure from not executed due to missing dependencies. I am not sure if this distinction can be achieved at the error message creation level or needs to be made in the task engine itself.


On 9 July 2013 at 02:09 Guido Wachsmuth tagged @gohla

On 9 July 2013 at 02:31 Gabriël Konat commented:

This requires modification of the task engine. Currently each task has a failed flag that indicates failure of that task or failure of its dependencies. To distinguish this we need another flag that indicates failure of dependencies. Message tasks should then only be evaluated if all its dependencies do not have the dependency failure flag set to true.

However, we do want to evaluate Choice tasks that have dependencies with dependency failures, since there might be one dependency that has results. So we would need another flag to indicate if a task should be evaluated if its dependencies have a dependency failure.


On 9 July 2013 at 08:04 Guido Wachsmuth commented:

You might also make this a derived value, i.e. not store it, but calculate it if needed. real-failure = failure && all-dependencies-fullfilled. I am not sure if all-dependencies-fullfilled is already there. If not, it would be useful to have, because it basically tells this task is available for execution.


On 13 July 2013 at 01:59 Gabriël Konat tagged feature

On 13 July 2013 at 01:59 Gabriël Konat removed tag improvement

On 26 July 2013 at 22:25 Gabriël Konat removed tag @gohla

On 26 July 2013 at 22:28 Gabriël Konat tagged @gohla

On 3 December 2013 at 16:32 Gabriël Konat commented:

Implemented in https://github.com/metaborg/runtime-libraries/tree/separate-depfail, will merge into master after testing.


On 19 January 2014 at 01:32 Guido Wachsmuth commented:

Looks like this was merged in 24464f3882.


On 19 January 2014 at 01:32 Guido Wachsmuth closed this issue.

Log in to post comments