Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349599

Summary: [Tests] EMF runtime compatibility issue and duplicate code in test models
Product: [Modeling] EMF Reporter: Victor Roldan Betancort <vroldanbet>
Component: cdo.coreAssignee: Victor Roldan Betancort <vroldanbet>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: martin.fluegge
Version: 4.1Flags: stepper: review+
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch v1
none
Patch Dawn v1
none
Patch Dawn v2
none
Patch Dawn v3
none
patch v2
none
Additional manifest fix none

Description Victor Roldan Betancort CLA 2011-06-16 13:26:16 EDT
To issues to address here:

- Test models are generated targeting EMF 2.7, which breaks compatibility with 2.6
- There is duplicate code in several packages (the utils package)

Affected test models for the duplicate code issue:
- model2
- mode3
- mode4
- model4interfaces
- model5
- model6

Affected test models for the runtime issue:
- mango
- model3
Comment 1 Victor Roldan Betancort CLA 2011-06-16 13:28:33 EDT
Created attachment 198136 [details]
patch v1

- changed all genmodels to target 2.6
- regenerated mango and model3
- removed duplicate code
Comment 2 Martin Fluegge CLA 2011-06-18 05:29:42 EDT
Created attachment 198225 [details]
Patch Dawn v1

Sorry, it took a bit longer, because I was (and still am) fighting with SWTBot to bring up some reliable UI tests for the code generation. But manual testing looks good, so here is the patch for Dawn.
Comment 3 Martin Fluegge CLA 2011-07-04 13:02:55 EDT
With CDO 4.0 released, I think we can now commit both patched. 

We should also raise a maintenance bug for this issue to have the fix in Indigo SR1. 

Eike, what do you think?
Comment 4 Eike Stepper CLA 2011-07-05 02:06:16 EDT
I have to reject both patches as they both create version errors. Guys, please install the version tool I've developed with a lot of effort. It will clearly tell you where to increase manifest versions. Martin, you even overlooked API errors.
Comment 5 Martin Fluegge CLA 2011-07-06 14:28:01 EDT
Created attachment 199199 [details]
Patch Dawn v2

I corrected the error. 

In my defence: When we applied the patches, CDO 4.0 GA was not yet released. So we were still operating on the 3.0 API Baseline. There was no chance to detected those errors in advance ;)
Comment 6 Eike Stepper CLA 2011-07-06 14:30:38 EDT
I see ;-)
Comment 7 Eike Stepper CLA 2011-07-06 14:31:18 EDT
Martin, I suppose your v1 patch is obsolete?
Comment 8 Martin Fluegge CLA 2011-07-06 14:46:52 EDT
Created attachment 199201 [details]
Patch Dawn v3

...with warnings removed...
Comment 9 Eike Stepper CLA 2011-07-21 23:21:30 EDT
(In reply to comment #3)
> With CDO 4.0 released, I think we can now commit both patched.
> We should also raise a maintenance bug for this issue to have the fix in Indigo SR1.

This confuses me. Is this a 4.0 bugzilla or not? Is this version value correct?
Comment 10 Martin Fluegge CLA 2011-07-22 02:25:17 EDT
This bugzilla was a 4.0 bug and was raised when we worked on 4.0. But we did not manage to fix before the release. It seems that we did miss to change the version number. But we need to fix this issue for 4.0 and 4.x, at least that is what I think.
Comment 11 Eike Stepper CLA 2011-07-22 02:36:54 EDT
So, what version do I have to apply the patches against?
Comment 12 Martin Fluegge CLA 2011-07-22 03:26:40 EDT
Correction. This on cannot be a maintenance issue, because fixing it breaks the API. So the Dawn patch has to be applied against HEAD only. I think this one is confusing because we are tracking the same issue on CDO and Dawn.

Since Dawn requires a major version switch, I fear that CDO need follow likewise. Vik, is this correct? Do we need to change to CDO 5.0 or are changes in the test models not that problematic.
Comment 13 Eike Stepper CLA 2011-07-22 03:31:05 EDT
(In reply to comment #12)
> Correction. This on cannot be a maintenance issue, because fixing it breaks the
> API. So the Dawn patch has to be applied against HEAD only. 

I see.

> I think this one is
> confusing because we are tracking the same issue on CDO and Dawn.

Cany ou please factor out a new bug, so that we can clone one of them to 4.0 maintenance?

> Since Dawn requires a major version switch, I fear that CDO need follow
> likewise. 

Not necessarily because the CDO (model repoitory) plugins do not depend and reexport Dawn plugins. Major tests versions  should never be impacted because I've made all tests internal (did I miss any?).
Comment 14 Martin Fluegge CLA 2011-07-22 04:02:09 EDT
(In reply to comment #13)

> Cany ou please factor out a new bug, so that we can clone one of them to 4.0
> maintenance?
> 

I filed Bug 352823 and attached Dawn patch v3. 

I assigned this one to Vik, that he can continue on the CDO changes he already started.

> Major tests versions  should never be impacted because
> I've made all tests internal (did I miss any?).

I see. Then there should be no problem for CDO ;)
Comment 15 Victor Roldan Betancort CLA 2011-07-22 05:54:41 EDT
I believe it breaks API because of the Dawn plugins, not because our test-framework. If you generated to EMF 2.7 runtime, a user may extend it and rely on, for instance of EMF new Switch mechanism.

So yeah, this doesn't break CDO APIs, because it only affects test-plugins.

What's the state of the patch? Is it deprecated?

If so, I'll factor out CDO changes, provide a new one, and wait for review
Comment 16 Victor Roldan Betancort CLA 2011-07-22 06:00:04 EDT
According to GIT, my repo is up to date so... I assume the current patch is valid, is that right?
Comment 17 Victor Roldan Betancort CLA 2011-07-22 06:00:46 EDT
Sorry guys, this last comment was meant to be in another bug. Consequences of multitasking ;)
Comment 18 Martin Fluegge CLA 2011-07-22 06:27:46 EDT
> What's the state of the patch? Is it deprecated?

As far as I remember Eike found some version errors in the patch.
Comment 19 Victor Roldan Betancort CLA 2011-07-22 07:25:20 EDT
Ah, yeah, that's because I was not using his wonderful versioning tool :P
Comment 20 Victor Roldan Betancort CLA 2011-07-22 08:37:51 EDT
Created attachment 200176 [details]
patch v2

fixed versioning issues
Comment 21 Eike Stepper CLA 2011-07-25 23:40:30 EDT
Vik, please commit eventually.
Comment 22 Victor Roldan Betancort CLA 2011-07-26 01:27:40 EDT
Eike, could you commit? Im out of the office until 8th august. Thanks!
Comment 23 Eike Stepper CLA 2011-07-26 01:55:18 EDT
Committed revision 8817 for Vik.
Comment 24 Eike Stepper CLA 2011-07-27 03:40:55 EDT
Do we want this in 4.0?
Comment 25 Victor Roldan Betancort CLA 2011-07-27 03:48:27 EDT
Eike,
Yes, since im not allowed to migrate to 4.1, id appreciate that!
Comment 26 Eike Stepper CLA 2011-07-27 04:13:04 EDT
4.0 Fix is in bug 353180.
Comment 27 Eike Stepper CLA 2011-07-27 04:13:40 EDT
Not all package export versions have been properly updated here.
Comment 28 Eike Stepper CLA 2011-07-27 04:14:22 EDT
Created attachment 200430 [details]
Additional manifest fix
Comment 29 Eike Stepper CLA 2011-07-27 04:14:52 EDT
Committed revision 8828
Comment 30 Eike Stepper CLA 2012-09-21 07:16:58 EDT
Closing.