Error building eclipse plugin with acoda enabled
EDIT: Updated the issue title and description to reflect the actual issue which we found out later:
On 18 Dec Christoffer Gersen wrote:
I have seen this before, but when I set acoda.enabled=false it works for me. Acoda also has definitions for the PropertyNoAnnos(_, _, ) and SimpleType() constructors, which seems to prevent them from being generated, but their definition is not imported from the org.acoda.editor package when required. With acoda.enabled=false the constructors are not recognized as external definitions, so the $Property$No$Annos_3_0 and $Simple$Type_1_0 classes are generated.
These are the errors when building the compiler with
acoda.enabled
set totrue
(all.release task):... [java] [ Main | info ] Compilation succeeded : [user/system] = [16.91s/0.00s] [javac] /home/elmer/workspace/webdsl.editor/build.generated.xml:421: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 2176 source files to /home/elmer/workspace/webdsl.editor/bin [javac] ---------- [javac] 1. ERROR in /home/elmer/workspace/webdsl.editor/editor/java-generated/trans/$Id$Mobl$Property_0_0.java (at line 28) [javac] term = $Property$No$Annos_3_0.instance.invoke(context, term, $Nil_0_0.instance, lifted1736.instance, lifted1737.instance); [javac] ^^^^^^^^^^^^^^^^^^^^^^ [javac] $Property$No$Annos_3_0 cannot be resolved [javac] ---------- [javac] ---------- [javac] 2. ERROR in /home/elmer/workspace/webdsl.editor/editor/java-generated/trans/lifted1737.java (at line 27) [javac] term = $Simple$Type_1_0.instance.invoke(context, term, lifted1738.instance); [javac] ^^^^^^^^^^^^^^^^ [javac] $Simple$Type_1_0 cannot be resolved [javac] ---------- [javac] 2 problems (2 errors)
complete build log here (tip: click expand icon on top right)
When commenting the following lines in
webdsl_editor/trans/webdsl_editor.str
it works fine:// webservices-generation/json // webservices-generation/model-tree // webservices-generation/mobl/model-to-mobl // webservices-generation/interface
This is my
import.webdsl.properties
:Submitted by Elmer van Chastelet on 18 December 2012 at 13:48# Please adapt the paths below to suit your system and copy them to a import.webdsl.properties file # webdsl.home is assumed to be the _source_ dir of webdsl in this file webdsl.installdir=/WEBDSLINSTALL acoda.home=${user.home}/Acoda acoda.enabled=true webdsl.home=${webdsl.installdir}/share externaldef=${webdsl.installdir}/share/sdf/webdsl/WebDSL.def externaljar=${webdsl.installdir}/bin/webdsl.jar webdsl.projectdir=${webdsl.installdir}/share/webdsl # used in dr-analysis/build.xml webdsl.sources=${webdsl.installdir}/share/webdsl/plugin-build-deps/webdsl-sources javafront.share=${webdsl.installdir}/share/webdsl/plugin-build-deps/java-front
Issue Log
For me and the buildfarm the stuff is working, so i could point to some strange things I noticed:
the first error is a overlay pointing to simpleConstruct where in the translation i have the same line:
term = $Property$No$Annos_3_0.instance.invoke(context, term, $Nil_0_0.instance, lifted4699.instance, lifted4700.instance);
the second error is strange, if i do a search through all the generated java code i can’t find $Simple$Type however i do find something that could be a difference in the generation
term = $Native$Simple$Type_1_0.instance.invoke(context, term, lifted4789.instance);
something else what points to a generation problem:
as you can see error 1 points as last argument to the class in error2
If I follow this pattern this means for me class lifted4700 as shown below you can’t find the line with $Simple$Type or something that looks like it
@Override public IStrategoTerm invoke(Context context, IStrategoTerm term) { ITermFactory termFactory = context.getFactory(); Fail32354: { IStrategoTerm p_36498 = null; IStrategoTerm q_36498 = null; if(term.getTermType() != IStrategoTerm.APPL || Main._consSimpleType_1 != ((IStrategoAppl)term).getConstructor()) break Fail32354; q_36498 = term.getSubterm(0); IStrategoList annos1241 = term.getAnnotations(); p_36498 = annos1241; term = q_36498; if(term.getTermType() != IStrategoTerm.STRING || !"String".equals(((IStrategoString)term).stringValue())) break Fail32354; term = termFactory.annotateTerm(termFactory.makeAppl(Main._consSimpleType_1, new IStrategoTerm[]{term}), checkListAnnos(termFactory, p_36498)); if(true) return term; } return null; }
This is the code from error 2 (the lifted counter is now at 493, where it is 1737 in issue description):
@SuppressWarnings("all") final class lifted493 extends Strategy { public static final lifted493 instance = new lifted493(); @Override public IStrategoTerm invoke(Context context, IStrategoTerm term) { Fail4734: { term = $Simple$Type_1_0.instance.invoke(context, term, lifted494.instance); if(term == null) break Fail4734; if(true) return term; } return null; } }
I have seen this before, but when I set
acoda.enabled=false
it works for me. Acoda also has definitions for thePropertyNoAnnos(_, _, _)
andSimpleType(_)
constructors, which seems to prevent them from being generated, but their definition is not imported from theorg.acoda.editor
package when required. Withacoda.enabled=false
the constructors are not recognized as external definitions, so the$Property$No$Annos_3_0
and$Simple$Type_1_0
classes are generated.
We were already searching for conflicting constructors but, acoda is not indexed so that makes sence it didn’t show up in the results
@Christoffer Gersen:
That seems to be a logic explanation. However I have changed
acoda.enabled
tofalse
, cleaned the project, and build again -> Still those 2 errors :/I will try a clean checkout of the editor now to check if it’s something that’s not cleaned up properly.
And kinda “solved”.
A new editor checkout with acoda disabled in the properties file works.So the actual issue is that acoda cannot be enabled any more.
Another issue is that the clean task doesn’t properly clean.
Log in to post comments