Message task does not execute
Given the following:
ty-exp0 := <type-task(|ctx)> exp0; cty-exp0 := <type-task-coerce(|ctx)> (ty-exp0, |[ Bool ]|); check1 := <type-match(type-boolean-is|ctx)> cty-exp0; <task-create-error-on-failure(|ctx, check1, <ERR_UNOP_UNAPPLICABLE(|ctx, "?", ty-exp0)>)> exp0
The error task does not execute even if check1 fails. Check1 is a Rewrite task. If i rewrite the code above to:
ty-exp0 := <type-task(|ctx)> exp0; cty-exp0 := <type-task-coerce(|ctx)> (ty-exp0, |[ Bool ]|); check1 := <type-match(|ctx, |[ Bool ]|)> cty-exp0; <task-create-error-on-failure(|ctx, check1, <ERR_UNOP_UNAPPLICABLE(|ctx, "?", ty-exp0)>)> exp0
Then it starts working.
In both of the examples above tasks
Submitted by Vlad Vergu on 10 December 2013 at 10:42cty-exp0
,check1
actually fail (by design).
Issue Log
Is the error task actually created in both variants?
And istype-match(s|ctx)
your own creation?
Yes, and yes.
<type-match(s|ctx)> t
will producet
iff<s> t
succeeds during task evaluation.
To understand this better, can you please
- use both variants in parallel,
- provide the task IDs for
ty-exp0
,cry-exp0
,check1
in both variants, and the error task in both variants,- provide the results of task
check1
in both variants (which should be failure, I assume),- provide the stored dependencies of
check1
in both variants and the error task in both variants.
It’s an issue with the dependency failure propagation, I am looking into it.
Seems like it is not possible to automatically detect whether to show a message by looking at dependency failure. I added message factories where you can explicitly specify which tasks will cause the message not to show when those tasks fails in https://github.com/metaborg/runtime-libraries/commit/e9abc12f8b7f39b0dc7c4743830afcf6a50aa7ce.
Log in to post comments