Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] IAdaptable name clash
[CDO] IAdaptable name clash [message #1692777] Sat, 18 April 2015 07:57 Go to next message
Andras Peteri is currently offline Andras PeteriFriend
Messages: 22
Registered: January 2010
Junior Member
Hi,

After updating my local CDO development environment (on master), and re-running Setup tasks, I started getting the following compile error message from multiple UI projects:

"Name clash: The method getAdapter(Class<T>) of type ContainerView has the same erasure as getAdapter(Class) of type WorkbenchPart but does not override it" (ContainerView.java)

According to the affected projects' "Plug-in Dependencies" container, they all get the non-generic version of IAdaptable from org.eclipse.equinox.common_3.6.200.v20130402-1505; the lower bound of required org.eclipse bundle version ranges in their manifests allows this. They depend on org.eclipse.ui and/or org.eclipse.core.runtime that in turn depends on org.eclipse.equinox.common. The corresponding plug-in versions in my target platform are:

* org.eclipse.ui: 3.106.1.v20141002-1150
* org.eclipse.core.runtime: 3.10.0.v20140318-2214
* org.eclipse.equinox.common: 3.6.200.v20130402-1505

What should be done to get the workspace projects to compile? I assume that at runtime, these set of plugins would actually work because of type erasure.
Re: [CDO] IAdaptable name clash [message #1692780 is a reply to message #1692777] Sat, 18 April 2015 09:39 Go to previous messageGo to next message
Andras Peteri is currently offline Andras PeteriFriend
Messages: 22
Registered: January 2010
Junior Member
Adding a requirement for org.eclipse.equinox.common 3.7.0 to the CDO targlet fixes this (I also added http://download.eclipse.org/releases/mars to the Mars repository list).

I found this message: https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg11589.html suggesting that Require-Bundle versions should also be updated, but I'm not sure if it's applicable.
Re: [CDO] IAdaptable name clash [message #1692983 is a reply to message #1692777] Tue, 21 April 2015 05:39 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6447
Registered: July 2009
Senior Member
Hi Andras,

Have you also pulled the latest commits from master? The following commit introduced the adjustments needed to
compensate the API changes in org.eclipse.equinox.common:

http://git.eclipse.org/c/cdo/cdo.git/commit/?id=20582a73ebe7c16c9b3a5621e5dbd4c80f2f6d46

More comments below...

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 18.04.2015 um 09:57 schrieb Andras Peteri:
> Hi,
>
> After updating my local CDO development environment (on master), and re-running Setup tasks, I started getting the
> following compile error message from multiple UI projects:
>
> "Name clash: The method getAdapter(Class<T>) of type ContainerView has the same erasure as getAdapter(Class) of type
> WorkbenchPart but does not override it" (ContainerView.java)
>
> According to the affected projects' "Plug-in Dependencies" container, they all get the non-generic version of
> IAdaptable from org.eclipse.equinox.common_3.6.200.v20130402-1505; the lower bound of required org.eclipse bundle
> version ranges in their manifests allows this. They depend on org.eclipse.ui and/or org.eclipse.core.runtime that in
> turn depends on org.eclipse.equinox.common. The corresponding plug-in versions in my target platform are:
>
> * org.eclipse.ui: 3.106.1.v20141002-1150
> * org.eclipse.core.runtime: 3.10.0.v20140318-2214
> * org.eclipse.equinox.common: 3.6.200.v20130402-1505
That seems to old. When I perform the setup model I end up with org.eclipse.equinox.common_3.7.0.v20150318-1503.jar

Can you paste your *merged* TargletTask here? Are you importing other projects together with CDO?

>
> What should be done to get the workspace projects to compile? I assume that at runtime, these set of plugins would
> actually work because of type erasure.
Yes, otherwise Equinox couldn't have made these changes.


Re: [CDO] IAdaptable name clash [message #1692984 is a reply to message #1692780] Tue, 21 April 2015 05:42 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6447
Registered: July 2009
Senior Member
Am 18.04.2015 um 11:39 schrieb Andras Peteri:
> Adding a requirement for org.eclipse.equinox.common 3.7.0 to the CDO targlet fixes this (I also added
> http://download.eclipse.org/releases/mars to the Mars repository list).
Release train projects (i.e. those that contribute to the release train) must not consume their upstream dependencies
from the release train. A good example for what can happen is Mylyn; they built their M6 against Platform M5 and didn't
recognize that the Platform removed some internal code in M6. So Mylyn built fine, but when they contributed their build
to the release train, it didn't work anymore.

>
> I found this message: https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg11589.html suggesting that
> Require-Bundle versions should also be updated, but I'm not sure if it's applicable.
I've applied the respective changes in
http://git.eclipse.org/c/cdo/cdo.git/commit/?id=20582a73ebe7c16c9b3a5621e5dbd4c80f2f6d46

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] IAdaptable name clash [message #1693028 is a reply to message #1692984] Tue, 21 April 2015 10:34 Go to previous messageGo to next message
Andras Peteri is currently offline Andras PeteriFriend
Messages: 22
Registered: January 2010
Junior Member
Hi Eike,

Quote:
Release train projects (i.e. those that contribute to the release train) must not consume their upstream dependencies
from the release train. A good example for what can happen is Mylyn; they built their M6 against Platform M5 and didn't
recognize that the Platform removed some internal code in M6. So Mylyn built fine, but when they contributed their build
to the release train, it didn't work anymore.


Thanks for the explanation, it is completely reasonable. But now I'm wondering how CDO or other projects can build on this functionality in its preliminary state, and what repository is providing the newer equinox.common bundle in CDO's setup model? I couldn't tell just by looking at the repository list.

I have started provisioning a workspace from scratch, and the setup log now says that http://download.eclipse.org/eclipse/updates/4.5milestones will be included in the list of repositories to use, which I don't remember seeing earlier (I can only find a reference to it in build.rmap in the workspace). My guess is that if not set explicitly, it is up to the P2 resolver's discretion which version of the bundle it ultimately chooses, if alternatives are available and the version requirements are otherwise met.

--
András
Re: [CDO] IAdaptable name clash [message #1693037 is a reply to message #1693028] Tue, 21 April 2015 11:27 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6447
Registered: July 2009
Senior Member
Am 21.04.2015 um 12:34 schrieb Andras Peteri:
> I have started provisioning a workspace from scratch, and the setup log now says that
> http://download.eclipse.org/eclipse/updates/4.5milestones will be included in the list of repositories to use, which I
> don't remember seeing earlier (I can only find a reference to it in build.rmap in the workspace). My guess is that if
> not set explicitly, it is up to the P2 resolver's discretion which version of the bundle it ultimately chooses, if
> alternatives are available and the version requirements are otherwise met.
No, the platform repo comes from an iherited TargletTask taht lives in the Eclipse.org project catalog.

Perhaps you chose Luna for the TP when you had the problem earlier?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] IAdaptable name clash [message #1693056 is a reply to message #1693037] Tue, 21 April 2015 13:08 Go to previous message
Andras Peteri is currently offline Andras PeteriFriend
Messages: 22
Registered: January 2010
Junior Member
And indeed, there it is. Smile I thought that ${cdo.target.platform} controls both the project's as well as the parent Targlet's repository list, but I missed ${eclipse.target.platform} in the workspace.setup model. Thanks for your help!

--
András
Previous Topic:Showing Problem Indiators and Problem Descriptions for a TreeViewer
Next Topic:[CDO] Resolving merge conflicts
Goto Forum:
  


Current Time: Wed Oct 23 18:07:18 GMT 2019

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

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

Back to the top