Old 'constraint-error' broken
Errors/warning for editors that use the old constraint checking mechanism show up, but never disappear (only after hitting
Analysis>Reset and reanalysis
).
We should either fix this if we want to be backwards compatible or otherwise provide a generic error to tell the language developer that they should switch to task-based constraint checking.The Entity language should also use the task-based things.
Submitted by Oskar van Rest on 23 July 2014 at 19:28
Issue Log
Somehow the problem does not occur with the Entity lang. I don’t understand why though, because both languages use the default analysis rules.
Try deleting the runtime libraries from your lib folder and rebuild.
Nope, won’t help.
Is this still a problem in the latest nightly? I fixed some other bugs that might have caused this.
Yes, issue still persists. I have now been able to create a minimal example to reproduce the bug:
- Create a new Spoofax project and make sure to check
Generate minimal project only
- Add this to the grammar:
context-free syntax
Start.Module = <
module<{Definition "\n\n"}*>
>
Definition.Entity = <
entity {
<{Property “\n”}*>
}
>Property.Property = <<ID> : >
Type.Type = «ID»
3: Add this to
check.str
:imports lib/editor-common.generated rules constraint-warning: Entity(x, _) -> (x, $[Entity names must start with a capital]) where not(<string-starts-with-capital> x)
4: Create an example instance that trigger the warning. Now, try to get rid of the warning by changing
e1
intoE1
module m1 entity e1 { }
I really don’t understand why the issue shows up when creating an Entity language by starting from a minimum Spoofax project, but not when simply generating the Entity language.
Log in to post comments