The messages from constraint-error, constraint-warning and constraint-note are no longer collected and displayed (probably since this change). Has this perhaps been replaced by nabl-constraint(|ctx)?

Yet, existing projects (such as SDF3) still use constraint-error for errors. Also, new Spoofax projects by default have extension points for constraint-error, constraint-warning and constraint-note in check.str.

Submitted by D. Pelsmaeker on 1 July 2014 at 10:37

On 1 July 2014 at 11:48 Daco Harkes commented:

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
    end

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


On 1 July 2014 at 12:54 D. Pelsmaeker commented:

So this should be changed in the Spoofax generated project too.
I created a pull request to change this for SDF.


On 3 July 2014 at 19:52 Gabriël Konat commented:

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 from constraint-* into message tasks. This only works if the rules do not depend on name and type information by calling post-collect strategies such as get-type .


On 3 July 2014 at 23:47 Gabriël Konat commented:

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.


On 3 July 2014 at 23:47 Gabriël Konat closed this issue.

On 4 November 2014 at 15:14 Gabriël Konat tagged 1.3

Log in to post comments