Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » problems when running mwe2 with Xbase 2.8
problems when running mwe2 with Xbase 2.8 [message #1630608] Mon, 23 February 2015 09:31 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1775
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I'm currently using Xtext 2.8 from the nightly update site, in a
language that uses Xbase

this morning I've updated it and using 2.8.0.v201502220955

when running the mwe2 workflow I'm getting many errors of the shape

928 [main] ERROR ipse.xtext.generator.LanguageConfig -
[TransformationDiagnostic: null:123 Cannot add supertype 'XExpression'
to sealed type 'OrExpression'.

TransformationDiagnostic: null:123 Cannot add supertype 'XExpression' to
sealed type 'OrExpression'. (ErrorCode: CannotCreateTypeInSealedMetamodel)

where OrExpression is defined in a rule as follows

PremiseExpression returns xbase::XExpression:
TerminalPremiseExpression
=>({OrExpression.branches+=current} ...
;

has anything changed in the way rules and inheritance relations must be
specified, or is it just a bug in this version?

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: problems when running mwe2 with Xbase 2.8 [message #1630675 is a reply to message #1630608] Mon, 23 February 2015 10:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
Hi

I've certainly noticed changes in this area, but I'm never sure what the
correct policy is for multi-layer grammars; I've changed a few times
since Xtext 2.3 when it was simple; you could import
platform:/resource/... and everything worked nicely.

With MWE2 2.8, the declarations seem more sensible. You must now
registerEcoreFile for each platform:/resource/... and it all works.

e.g.

Workflow {
bean = StandaloneSetup {
platformUri = "${QVTcoreRuntimeProject}/.."
scanClassPath = true
registerEcoreFile =
"platform:/resource/org.eclipse.ocl.pivot/model/Pivot.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.qvtd.pivot.qvtcorebase/model/QVTcoreBase.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.ocl.xtext.base/model/BaseCS.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.qvtd.xtext.qvtcorebase/model/QVTcoreBaseCS.ecore"
registerEcoreFile =
"platform:/resource/org.eclipse.qvtd.xtext.qvtcore/model/QVTcoreCS.ecore"
registerGenModelFile =
"platform:/resource/org.eclipse.qvtd.xtext.qvtcore/model/QVTcoreCS.genmodel"
}

however my multi-editor MWE2 scripts don't work anymore: e.g.

Workflow {
component = @GenerateQVTcoreBaseEditor {}
component = @GenerateQVTcoreEditor {}
component = @GenerateQVTimperativeEditor {}
component = @GenerateQVTrelationEditor {}
}

Something has incorrectly loaded http:/... instead of, or as well as,
platform:/resource and so if you have a better platform:/resource than
http:/... you get the cannot-add-feature diagnostic.

Xtext 2.8 has also gone backwards. It too seems determined to use the
referenced http:/... intermittently rather than the required
platform:/resource, so somehow the magic model index that burns cycles
to support the requirement to reference the wrong model doesn't correct
the wrong reference. I now ignore Xtext editor errors that I don't believe.

Bring back Xtext 2.3; you import what you actually want and no clever
index is needed to re-interpret what you import. A system that requires
an erroneous declaration seems doomed to fail.

Regards

Ed Willink

On 23/02/2015 09:31, Lorenzo Bettini wrote:
> Hi
>
> I'm currently using Xtext 2.8 from the nightly update site, in a
> language that uses Xbase
>
> this morning I've updated it and using 2.8.0.v201502220955
>
> when running the mwe2 workflow I'm getting many errors of the shape
>
> 928 [main] ERROR ipse.xtext.generator.LanguageConfig -
> [TransformationDiagnostic: null:123 Cannot add supertype 'XExpression'
> to sealed type 'OrExpression'.
>
> TransformationDiagnostic: null:123 Cannot add supertype 'XExpression' to
> sealed type 'OrExpression'. (ErrorCode: CannotCreateTypeInSealedMetamodel)
>
> where OrExpression is defined in a rule as follows
>
> PremiseExpression returns xbase::XExpression:
> TerminalPremiseExpression
> =>({OrExpression.branches+=current} ...
> ;
>
> has anything changed in the way rules and inheritance relations must be
> specified, or is it just a bug in this version?
>
> thanks in advance
> Lorenzo
>
Re: problems when running mwe2 with Xbase 2.8 [message #1631007 is a reply to message #1630608] Mon, 23 February 2015 14:33 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1775
Registered: July 2009
Location: Firenze, Italy
Senior Member
This problem is present also in

2.8.0.v201502230836

taken from latest update site

It wasn't there in version 2.8.0.v201502181731 though I cannot revert to
that version since it disappeared from the update sites.

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: problems when running mwe2 with Xbase 2.8 [message #1635420 is a reply to message #1631007] Wed, 25 February 2015 19:53 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1775
Registered: July 2009
Location: Firenze, Italy
Senior Member
I think I solved the problem; I forgot to mention that I'm using a
manually maintained ecore model.

The changes necessary to make the workflow work can be seen in this commit:

https://github.com/LorenzoBettini/xsemantics/commit/866f7b83d76bc5a8a5866969ae07cc235cc530f6

The solution seems to be to use the same resource set throughout the
workflow...

but I'd like to know whether this is the right solution, or whether the
original problem is due to a bug...

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: problems when running mwe2 with Xbase 2.8 [message #1641817 is a reply to message #1630675] Sat, 28 February 2015 20:19 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
Hi

Xtext has reverted some incompatible changes introduced at M4. My
observations below on changes that may be necessary to MWE2 scripts are
no longer applicable. I have been able to revert my scripts to as they were.

Regards

Ed Willink

On 23/02/2015 10:20, Ed Willink wrote:
> Hi
>
> I've certainly noticed changes in this area, but I'm never sure what
> the correct policy is for multi-layer grammars; I've changed a few
> times since Xtext 2.3 when it was simple; you could import
> platform:/resource/... and everything worked nicely.
>
> With MWE2 2.8, the declarations seem more sensible. You must now
> registerEcoreFile for each platform:/resource/... and it all works.
>
> e.g.
>
> Workflow {
> bean = StandaloneSetup {
> platformUri = "${QVTcoreRuntimeProject}/.."
> scanClassPath = true
> registerEcoreFile =
> "platform:/resource/org.eclipse.ocl.pivot/model/Pivot.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.pivot.qvtcorebase/model/QVTcoreBase.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.ocl.xtext.base/model/BaseCS.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.xtext.qvtcorebase/model/QVTcoreBaseCS.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.xtext.qvtcore/model/QVTcoreCS.ecore"
> registerGenModelFile =
> "platform:/resource/org.eclipse.qvtd.xtext.qvtcore/model/QVTcoreCS.genmodel"
> }
>
> however my multi-editor MWE2 scripts don't work anymore: e.g.
>
> Workflow {
> component = @GenerateQVTcoreBaseEditor {}
> component = @GenerateQVTcoreEditor {}
> component = @GenerateQVTimperativeEditor {}
> component = @GenerateQVTrelationEditor {}
> }
>
> Something has incorrectly loaded http:/... instead of, or as well as,
> platform:/resource and so if you have a better platform:/resource than
> http:/... you get the cannot-add-feature diagnostic.
>
> Xtext 2.8 has also gone backwards. It too seems determined to use the
> referenced http:/... intermittently rather than the required
> platform:/resource, so somehow the magic model index that burns cycles
> to support the requirement to reference the wrong model doesn't
> correct the wrong reference. I now ignore Xtext editor errors that I
> don't believe.
>
> Bring back Xtext 2.3; you import what you actually want and no clever
> index is needed to re-interpret what you import. A system that
> requires an erroneous declaration seems doomed to fail.
>
> Regards
>
> Ed Willink
>
> On 23/02/2015 09:31, Lorenzo Bettini wrote:
>> Hi
>>
>> I'm currently using Xtext 2.8 from the nightly update site, in a
>> language that uses Xbase
>>
>> this morning I've updated it and using 2.8.0.v201502220955
>>
>> when running the mwe2 workflow I'm getting many errors of the shape
>>
>> 928 [main] ERROR ipse.xtext.generator.LanguageConfig -
>> [TransformationDiagnostic: null:123 Cannot add supertype 'XExpression'
>> to sealed type 'OrExpression'.
>>
>> TransformationDiagnostic: null:123 Cannot add supertype 'XExpression' to
>> sealed type 'OrExpression'. (ErrorCode:
>> CannotCreateTypeInSealedMetamodel)
>>
>> where OrExpression is defined in a rule as follows
>>
>> PremiseExpression returns xbase::XExpression:
>> TerminalPremiseExpression
>> =>({OrExpression.branches+=current} ...
>> ;
>>
>> has anything changed in the way rules and inheritance relations must be
>> specified, or is it just a bug in this version?
>>
>> thanks in advance
>> Lorenzo
>>
>
Previous Topic:Which JDK version shall be used for Xtext
Next Topic:Why xtend does not support the array format of a parameter
Goto Forum:
  


Current Time: Sun Apr 18 07:15:28 GMT 2021

Powered by FUDForum. Page generated in 0.02104 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top