Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[incquery-dev] Xtext compatibility problem

Hi,

today I have seen a strange classcastexception from the internals of XbaseGrammarAccess (see the end of the mail for the concrete trace), that caused the entire code generator stop working.

After some evaluation, I realized the issue was that I used Xtext 2.5 with the latest installable version (compiled with Xtext 2.4). As an experiment, I have replaced the installed IncQuery version with the one compiled by the job https://hudson.eclipse.org/incquery/job/incquery-xcore/ (with Xtext 2.5), and this issue went away.

Alltogether, this means, we have source compatibility between Xtext 2.4 and 2.5 (IncQuery work fine with both), but needs to be compiled with the corresponding Xtext version. This does not mean we have to change our support plans (we can compile both versions automatically), just something we should be very careful about.

Cheers,
Zoli
-- Zoltán Ujhelyi
https://www.inf.mit.bme.hu/en/members/ujhelyiz

Fault Tolerant Systems Research Group
Budapest University of Technology and Economics


Caused by: java.lang.ClassCastException: org.eclipse.xtext.impl.AlternativesImpl cannot be cast to org.eclipse.xtext.Group
	at org.eclipse.xtext.xbase.services.XtypeGrammarAccess$JvmTypeParameterElements.<init>(XtypeGrammarAccess.java:344)
	at org.eclipse.xtext.xbase.services.XtypeGrammarAccess.getJvmTypeParameterAccess(XtypeGrammarAccess.java:694)
	at org.eclipse.xtext.xbase.services.XbaseGrammarAccess.getJvmTypeParameterAccess(XbaseGrammarAccess.java:3804)
	at org.eclipse.incquery.patternlanguage.services.PatternLanguageGrammarAccess.getJvmTypeParameterAccess(PatternLanguageGrammarAccess.java:2563)
	at org.eclipse.incquery.patternlanguage.emf.services.EMFPatternLanguageGrammarAccess.getJvmTypeParameterAccess(EMFPatternLanguageGrammarAccess.java:1659)
	at org.eclipse.incquery.patternlanguage.emf.ui.contentassist.antlr.EMFPatternLanguageParser$1.<init>(EMFPatternLanguageParser.java:82)
	at org.eclipse.incquery.patternlanguage.emf.ui.contentassist.antlr.EMFPatternLanguageParser.getRuleName(EMFPatternLanguageParser.java:37)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser.getFollowElements(AbstractContentAssistParser.java:67)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.computeFollowElements(ParserBasedContentAssistContextFactory.java:463)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.computeFollowElements(ParserBasedContentAssistContextFactory.java:401)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.computeFollowElements(ParserBasedContentAssistContextFactory.java:395)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.doCreateContexts(ParserBasedContentAssistContextFactory.java:345)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.createContextsForLastCompleteNode(ParserBasedContentAssistContextFactory.java:325)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.handleLastCompleteNodeIsPartOfLookahead(ParserBasedContentAssistContextFactory.java:259)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.doCreateContexts(ParserBasedContentAssistContextFactory.java:225)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.create(ParserBasedContentAssistContextFactory.java:200)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.create(ParserBasedContentAssistContextFactory.java:644)
	at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:48)
	at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:62)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:243)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:84)
	at org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor.computeCompletionProposals(XtextContentAssistProcessor.java:68)
	at org.eclipse.xtext.ui.editor.contentassist.RepeatedContentAssistProcessor.computeCompletionProposals(RepeatedContentAssistProcessor.java:75)
	at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:566)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:563)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:498)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:492)
	at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:378)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)

Back to the top