Project succeeds on ambiguous Stratego files
When you have an ambiguity in concrete object syntax, Stratego reports this as an error and
include/YourLanguage.rtree
is deleted. However, the builder reports success:Submitted by Guido Wachsmuth on 14 February 2013 at 14:23stratego.jvm.helper: [java] [ Main | error ] Ambiguity found in strategy desugar [java] amb> [java] 1> amb( [java] [Lt( [java] exp1 [java] , Or(exp2, Eq(exp1, exp2)) [java] )|[ Lt( [java] exp1 [java] , Eq(Or(exp2, exp1), exp2) [java] ) [java] ]] [java] ) [java] 2> amb( [java] [Eq( [java] Lt(exp1, Or(exp2, exp1)) [java] , exp2 [java] )|[ Eq( [java] Or(Lt(exp1, exp2), exp1) [java] , exp2 [java] ) [java] ]] [java] ) [java] <amb [java] [ Main | info ] Front-end succeeded : [user/system] = [9.03s/0.00s] [java] [ Main | info ] Optimization succeeded -O 2 : [user/system] = [0.46s/0.00s] [java] [ Main | info ] Abstract syntax in '/Users/guwac/Cloud/git/lwc2013/org.spoofax.lang.lwc.ql/include/ql.rtree' [java] [ Main | info ] Export of externals succeeded : [user/system] = [0.06s/0.00s] [delete] Deleting: /Users/guwac/Cloud/git/lwc2013/org.spoofax.lang.lwc.ql/include/ql.rtree refresh: sdf2imp.eclipse.load: spoofaximp.default.ctree: all: BUILD SUCCESSFUL
Issue Log
There is at least some weird behaviour there. I also noticed that when changing the syntax definition the STR files are parsed fine in the editor following a rebuild of the project, but this is not the case when building the project. A restart of Eclipse seems to help.
This is probably related to https://yellowgrass.org/issue/Spoofax/638
Actually, my previous comment is probably bogus. I suspect this is already fixed by a @gohla fix. Tagging him and rfc for this.
No, my fix was for a missing main Stratego file. I just checked the stratego.jvm.helper target, it has failonerror=“true” so it should actually fail when there are errors. Maybe strj does not mark the ambiguity as an error (prints to stderr or returns a certain integer from the Main function?).
For now the build should simply fail if there is no ctree file.
Log in to post comments