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

Bug 332490

Summary: emf-xsd-Update-2.7.0M4.zip archived p2 repo is not valid
Product: [Modeling] EMF Reporter: David Williams <david_williams>
Component: RelengAssignee: Nick Boldt <nboldt>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Ed.Merks, Kenn.Hussey, michal.ruza
Version: 2.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description David Williams CLA 2010-12-13 22:52:00 EST
I've tried to incorporate the M4 version of "emf and xsd sdk" into our WTP builds, and it fails as described below. That's why I'm entering this as "blocker". 

I download and unzip the emf-xsd-Update-2.7.0M4.zip file from 
modeling/emf/emf/downloads/drops/2.7.0/S201012131237

I select (name) the org.eclipse.emf.sdk.feature.group and the 
org.eclipse.xsd.sdk.feature.group

In our builds I use the p2 director app, but tried normal eclipse SDK UI to install it with same error: 

Cannot complete the install because one or more required items could not be found.
  Software being installed: XSD - XML Schema Definition SDK 2.7.0.v20100904-1725 (org.eclipse.xsd.sdk.feature.group 2.7.0.v20100904-1725)
  Missing requirement: EMF Edit 2.7.0.v20101105-1023 (org.eclipse.emf.edit 2.7.0.v20101105-1023) requires 'bundle org.eclipse.emf.common [2.6.0,3.0.0)' but it could not be found
  Cannot satisfy dependency:
    From: EMF Mapping 2.7.0.v20100905-1858 (org.eclipse.emf.mapping 2.7.0.v20100905-1858)
    To: bundle org.eclipse.emf.edit [2.7.0,3.0.0)
  Cannot satisfy dependency:
    From: XSD to Ecore Mapping 2.5.0.v20100521-1855 (org.eclipse.emf.mapping.xsd2ecore 2.5.0.v20100521-1855)
    To: bundle org.eclipse.emf.mapping [2.7.0,3.0.0)
  Cannot satisfy dependency:
    From: XSD Mapping 2.6.0.v20100601-1640 (org.eclipse.xsd.mapping.feature.group 2.6.0.v20100601-1640)
    To: org.eclipse.emf.mapping.xsd2ecore [2.5.0.v20100521-1855]
  Cannot satisfy dependency:
    From: XSD - XML Schema Definition SDK 2.7.0.v20100904-1725 (org.eclipse.xsd.sdk.feature.group 2.7.0.v20100904-1725)
    To: org.eclipse.xsd.mapping.feature.group [2.6.0.v20100601-1640]
Comment 1 David Williams CLA 2010-12-13 22:58:29 EST
If I select only emf sdk, I get following error message ... guess it is not specific to "xsd" as I said in the title ... 

Cannot complete the install because one or more required items could not be found.
  Software being installed: EMF - Eclipse Modeling Framework SDK 2.7.0.v20101205-0249 (org.eclipse.emf.sdk.feature.group 2.7.0.v20101205-0249)
  Missing requirement: EMF Ant Tasks 2.7.0.v20100905-1633 (org.eclipse.emf.ant 2.7.0.v20100905-1633) requires 'bundle org.eclipse.emf.common [2.6.0,3.0.0)' but it could not be found
  Cannot satisfy dependency:
    From: EMF - Eclipse Modeling Framework SDK 2.7.0.v20101205-0249 (org.eclipse.emf.sdk.feature.group 2.7.0.v20101205-0249)
    To: org.eclipse.emf.ant [2.7.0.v20100905-1633]
Comment 2 Nick Boldt CLA 2010-12-14 00:49:22 EST
Sounds like there area few issues:

a) you should be depending on plugins, not feature, if possible

b) failing (a), you should be depending on runtime and source features rather than SDK features, again if possible.

c) the EMF SDK feature does not include the org.eclipse.emf.ant feature.

d) the SDK SDK feature does not include the org.eclipse.emf.common [2.6.0,3.0.0)' plugin (or a feature that contains it)

Assigning to Ed for comments
Comment 3 Nick Boldt CLA 2010-12-14 00:50:01 EST
(In reply to comment #2)
> d) the SDK SDK feature does not include the org.eclipse.emf.common
> [2.6.0,3.0.0)' plugin (or a feature that contains it)

That should say "XSD SDK"
Comment 4 David Williams CLA 2010-12-14 03:18:02 EST
I was able to change some properties in our WTP build scripts and use the emf-xsd zip file instead of the archived p2 repository, so I can not really say this is blocking me. So, changed to 'major' and changed title to more accurately describe the overall problem. 

To respond to points 'a' and 'b' in comment #2, while I am not perfectly consistent, and change my mind every few months, I usually like to install for our builds, exactly what our committers and users will install, just as an extra check that "all is ok". Hope you appreciate the "early warning". :)
Comment 5 David Williams CLA 2010-12-15 01:01:27 EST
(In reply to comment #2)

> 
> Assigning to Ed for comments

Did you mean to assign to Ed, or CC him? I see neither ... so I will ... just in case you are waiting for him to say something :)
Comment 6 Ed Merks CLA 2010-12-15 09:59:52 EST
Kenn,

Any ideas what's going on?  Is this because we split out the core to make the e4 people happy and David is assuming the core is contained somewhere it's not contained anymore?
Comment 7 Kenn Hussey CLA 2010-12-15 10:07:57 EST
I suspect this is related to bug 332474. Basically, some of the version numbers "went back in time" because of a regression in Buckminster that was caused by removal of a method in p2.

We are in the process of building an M4a build of EMF.
Comment 8 Kenn Hussey CLA 2010-12-15 10:39:44 EST
(In reply to comment #7)
> We are in the process of building an M4a build of EMF.

The new M4a build has been posted. If you could verify that it works better for you, that would be great.
Comment 9 David Williams CLA 2010-12-15 14:14:19 EST
I have confirmed the simple case. I downloaded the new M4a p2 repo archive and could "install new software" using it (and the emf and xsd sdk features selected in the UI). So, I'm confident the p2 director use-case in our builds will work again too. 

It may be unrelated, but using the original M4 zip files, we were getting some unexplained compile errors in one of our bundles: 

1. ERROR: IllegalCast

Cannot cast from FeatureMap to InternalEList  

And, ... the really odd thing is, we got them only when I moved our compiler to JDT's 3.7 M4 level ... we were not getting the compile error when using 3.6 based compiler. 

But, since there's several moving targets here ... I'll try again with the M4a version of EMF and see if we still get the compile error. If we do, and only with 3.7 compiler not with 3.6 ... I'll open a new bug to sort that out. If we do not ... then that implies anyone who compiled against the original M4 EMF may be run right on M4a EMF? Its odd that it effected just one of our bundles ... so, could easily be some odd quick of that WTP bundle. I'm just mentioning it here in case any of you knowledgeable readers know all about that compile error and can reassure me all is just fine. :) 

But ... IMHO ... it would be worth a note to cross-project list that you have an M4a ... since that was provided after your +1 day, and some teams may want to re-test, if not re-compile. 

Thanks a bunch.
Comment 10 Ed Merks CLA 2010-12-15 14:29:54 EST
In the M3 version of JDT there were changes that broke things as well:

 https://bugs.eclipse.org/bugs/show_bug.cgi?id=330869

So I wouldn't be totally shocked if there are changes in M4 that break something else...

Given that EMF generates code like this:

  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
      case DBPackage.MOVIE_DB_TYPE__MOVIE_DB_FEATURE_MAP:
        return ((InternalEList<?>)getMovieDBFeatureMap()).basicRemove(otherEnd, msgs);

It would be very bad if we suddenly couldn't cast to InternalEList anymore.

I'll try to find time to get M4 and investigate if I'm seeing such problems in EMF...
Comment 11 Kenn Hussey CLA 2010-12-15 15:15:16 EST
(In reply to comment #9)
> But ... IMHO ... it would be worth a note to cross-project list that you have an
> M4a ... since that was provided after your +1 day, and some teams may want to
> re-test, if not re-compile.

Thanks, David. I've sent a note to the mailing list about the M4a build.
Comment 12 David Williams CLA 2010-12-15 16:51:27 EST
My apologies. The build (using p2 director) failed to install emf using the M4a "update zip" so I retraced my steps and saw that I did my IDE test incorrectly. 

I still can not install emf feature using the M4a update zip (I unzip it first into its own temporary directory, but do not think that matters).  

I do deselect "contact all software sites" (which I think is correct, and this repo is meant to be "self sufficient")

and then if I select first in list: 
EMF - Eclipse Modeling Framework Runtime and Tools	2.7.0.v20101215-0940

I get the following error in dialog

Cannot complete the install because one or more required items could not be found.
  Software being installed: EMF - Eclipse Modeling Framework Runtime and Tools 2.7.0.v20101215-0940 (org.eclipse.emf.feature.group 2.7.0.v20101215-0940)
  Missing requirement: EMF Common UI 2.6.0.v20101215-0940 (org.eclipse.emf.common.ui.feature.group 2.6.0.v20101215-0940) requires 'org.eclipse.emf.common 0.0.0' but it could not be found
  Cannot satisfy dependency:
    From: EMF - Eclipse Modeling Framework Runtime and Tools 2.7.0.v20101215-0940 (org.eclipse.emf.feature.group 2.7.0.v20101215-0940)
    To: org.eclipse.emf.common.ui.feature.group [2.6.0.v20101215-0940]
Comment 13 Kenn Hussey CLA 2010-12-15 17:14:36 EST
(In reply to comment #12)

I think I know what the problem is. That zip is based on the 'core' update site which no longer contains the 'base' features/bundles; rather, it references them.

We'll need to update the production of the zip so that it contains a composite repository that includes both the 'base' and 'core' repositories. We'll have to do this manually for M4a... I'll let you know when a replacement zip is available for download.
Comment 14 Kenn Hussey CLA 2010-12-15 18:00:32 EST
(In reply to comment #13)
> We'll need to update the production of the zip so that it contains a composite
> repository that includes both the 'base' and 'core' repositories. We'll have to
> do this manually for M4a... I'll let you know when a replacement zip is
> available for download.

The replacement zip is in place. It may take a while to propagate...
Comment 15 David Williams CLA 2010-12-15 21:22:26 EST
Yep, that one works. Thanks.
Comment 16 David Williams CLA 2010-12-16 10:42:23 EST
(In reply to comment #10)
> In the M3 version of JDT there were changes that broke things as well:
> 
>  https://bugs.eclipse.org/bugs/show_bug.cgi?id=330869
> 
> So I wouldn't be totally shocked if there are changes in M4 that break
> something else...
> 
> Given that EMF generates code like this:
> 
>   public NotificationChain eInverseRemove(InternalEObject otherEnd, int
> featureID, NotificationChain msgs)
>   {
>     switch (featureID)
>     {
>       case DBPackage.MOVIE_DB_TYPE__MOVIE_DB_FEATURE_MAP:
>         return ((InternalEList<?>)getMovieDBFeatureMap()).basicRemove(otherEnd,
> msgs);
> 
> It would be very bad if we suddenly couldn't cast to InternalEList anymore.
> 
> I'll try to find time to get M4 and investigate if I'm seeing such problems in
> EMF...


FYI, we have opened bug 332744 to discuss this compiler issue. Our intuition is might really be something the compiler was doing wrong before, and is now  correctly flagging an error. But ... kind of complicated, especially since interacts with with 1.4 vs. 1.5 compliance settings? ... but in any case figured it'd be worth documenting some users might see a "change in behavior".
Comment 17 Ed Merks CLA 2018-01-22 11:37:08 EST
Closing all fixed releng bugs.