eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

ocl-compatibility-oxygen test failure #2044

Closed eclipse-ocl-bot closed 2 weeks ago

eclipse-ocl-bot commented 2 weeks ago

| --- | --- | | Bugzilla Link | 544211 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Feb 07, 2019 05:02 EDT | | Modified | Feb 08, 2019 15:27 EDT | | See also | Gerrit change https://git.eclipse.org/r/136565, Git commit f81898c4 | | Reporter | Ed Willink |

Description

https://ci.eclipse.org/ocl/job/ocl-compatibility-oxygen/42/

java.lang.NoSuchMethodError: org.eclipse.emf.codegen.ecore.genmodel.GenModel.useInterfaceOverrideAnnotation()Z\ at junit.framework.Assert.fail(Assert.java:57)\ at junit.framework.TestCase.fail(TestCase.java:227)\ at org.eclipse.ocl.examples.test.xtext.UsageTests.doGenModel(UsageTests.java:414)\ at org.eclipse.ocl.examples.test.xtext.UsageTests.testPivotMetamodelImport414855(UsageTests.java:929)

Problem is that the new EMF variant templates for Bug 471114 are based on the latest EMF templates and so use an API not present in Oxygen.

Choices:\ a) mandate that OCL 6.7.0 requires emf.codegen.ecore 2.17.0\ b) create an OCL codegen sub-feature that requires emf.codegen.ecore 2.17.0\ c1) EMF recodes the template to avoid/support the new API\ c2) OCL recodes the template to avoid/support the new API\ d) create variant templates for Oxygen users

What is the use case? A user has an Eclipse Oxygen installation that for some reason they cannot upgrade (e.g. they like an old Papyrus better.) That user wants the latest OCL fixes.

d) fails to provide a consistent latest OCL\ c1) won't happen\ c2) is easy for useInterfaceOverrideAnnotation, but I suspect there will be more substantial difficulties with a new deprecated API.\ b) might be part of an eventual feature redesign but not now and it doesn;t support the use case.\ a) doesn't support the use case.

c2) is the only option - hope the deprecated API is not troublesome.

Long term c2) implies that every time EMF uses a new GenModel helper, OCL must recode it as an OCLGenModelUtil helper hoping that it has access to sub-helpers. This is very undesirable, we'll have to see how sustainable it is.

(Escape clause... we can always revert to a)/b) and throw away all the benefits of Bug 471114.)

eclipse-ocl-bot commented 2 weeks ago

By Ed Willink on Feb 07, 2019 16:37

(In reply to Ed Willink from comment #0)

c2) is the only option - hope the deprecated API is not troublesome.

A total of 205 calls to 10 missing APIs.

eclipse-ocl-bot commented 2 weeks ago

By Ed Willink on Feb 08, 2019 11:30

(In reply to Ed Willink from comment #1)

A total of 205 calls to 10 missing APIs.

Fortunately only about 25 genXXX.YYYY( patterns to change to OCLGenModelUtil.YYYY(genXXX,

Getting the EMF GenModel level switching right is subtle, so we need more compatibility tests.

oxygen, photon, 2018-09, 2018-12 jobs set to run every week.

Pushed to master for M3.

eclipse-ocl-bot commented 2 weeks ago

Feb 08, 2019 15:07

New Gerrit change created: https://git.eclipse.org/r/136565

eclipse-ocl-bot commented 2 weeks ago

Feb 08, 2019 15:27

Gerrit change https://git.eclipse.org/r/136565 was merged to [master].\ Commit: http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/commit/?id=f81898c43afd7aa99972746fe6c895da193af938