Errors, warnings and notes are no longer collected and displayed
The messages from
constraint-error,constraint-warningandconstraint-noteare no longer collected and displayed (probably since this change). Has this perhaps been replaced bynabl-constraint(|ctx)?Yet, existing projects (such as SDF3) still use
Submitted by D. Pelsmaeker on 1 July 2014 at 10:37constraint-errorfor errors. Also, new Spoofax projects by default have extension points forconstraint-error,constraint-warningandconstraint-noteincheck.str.
Issue Log
Gabriel removed support for the non-task-based constraints.
constraint-warning: Entity(_, x, _) -> (x, $[Entity type names must start with a capital]) where not(<string-starts-with-capital> x)Should now be:
nabl-constraint(|ctx): Entity(_, x, _) -> <fail> with if not(<string-starts-with-capital> x) then <task-create-warning(|ctx, ["Entity type names must start with a capital."])> x endUltimately these should be expressible in NaBL/TS.
Maybe it is a good idea to add back support for the non-task-based constraints untill they can be specified in NaBL/TS.
So this should be changed in the Spoofax generated project too.
I created a pull request to change this for SDF.
I removed this because it was causing inconsistencies in the incremental analysis. However, I think I can add it back by automatically converting the
(term, msg)tuples fromconstraint-*into message tasks. This only works if the rules do not depend on name and type information by calling post-collect strategies such asget-type.
I added support back in https://github.com/metaborg/spoofax/commit/3e86bef4de83007988297bf6438d2bb05724415e. They can even use type information because they are executed after the regular task execution.
Log in to post comments