I materialize the target platform for my xtext projects using a .cquery
and a .cspec containing all the target platform dependencies (I have a
cquery for the tp and one for the projects, as created by the Xtext
Buckminster wizard).

The reason you get this warning and multiple xtext versions is that something in your TP still requires
org.eclipse.xtext.xbase.lib:osgi.bundle/2.5.0. You'll have to figure out what feature or bundle that does that and then
remove it from the equation.

- thomas

On 2013-12-30 16:18, Lorenzo Bettini wrote:
> Hi
>
> I materialize the target platform for my xtext projects using a .cquery
> and a .cspec containing all the target platform dependencies (I have a
> cquery for the tp and one for the projects, as created by the Xtext
> Buckminster wizard).
>
> The cspec for the tp is as follows:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0"
> name="org.example.releng" componentType="buckminster" version="1.0.0">
> <cs:dependencies>
> <cs:dependency name="org.eclipse.platform"
> componentType="eclipse.feature"/>
> <cs:dependency name="org.eclipse.xtext.sdk"
> componentType="eclipse.feature" versionDesignator="[2.4.3,2.5.0)"/>
> </cs:dependencies>
> </cs:cspec>
>
> I use the versionDesignator because I want to build with Xtext 2.4.3
> (and not with the recently released 2.5.0 version).
>
> The Xtext features in the TP are materialized with the correct version
> 2.4.3, but some Xtext bundles are materialized twice: with version 2.4.3
> and 2.5.0.
>
> Indeed I get some warnings of the shape
>
> [java] WARNING [0042] : Component request
> org.eclipse.xtext.xbase.lib:osgi.bundle/[2.4.3.v201309030823,2.4.3.v201309030823]
> is in conflict with request org.eclipse.xtext.xbase.lib:osgi.bundle/2.5.0
> [java] INFO: TAG-ID 0042 = Query for org.example.releng:buckminster,
> path: org.example.releng:buckminster$1.0.0 ->
> org.eclipse.xtext.sdk:eclipse.feature$2.4.3.v201309030823 ->
> org.eclipse.xtext.xbase:eclipse.feature$2.4.3.v201309030823 ->
> org.eclipse.xtext.xbase.lib:eclipse.feature$2.4.3.v201309030823
>
> am I doing anything wrong? Or is the way Xtext features are deployed?
>
> I know that by using advisor nodes in the cquery I could force the
> versions, but I thought that specifying the version range in the .cspec
> would be enough...
>
> thanks in advance
> Lorenzo
>

On 02/01/2014 13:48, Thomas Hallgren wrote:
> Hi Lorenzo,
>
> The reason you get this warning and multiple xtext versions is that
> something in your TP still requires
> org.eclipse.xtext.xbase.lib:osgi.bundle/2.5.0. You'll have to figure out
> what feature or bundle that does that and then remove it from the equation.

Hi Thomas

the cspec of my TP is the one I wrote in the original message, thus
basically only

no other deps (besides org.eclipse.platform which surely do not have
deps on any xtext bundle).

Thus, can it be that this is due to some Xtext feature that has an
"open" version range? And then the resolution will pull in more recent
versions of xtext bundles?

thanks in advance
Lorenzo

>
> - thomas
>
> On 2013-12-30 16:18, Lorenzo Bettini wrote:
>> Hi
>>
>> I materialize the target platform for my xtext projects using a .cquery
>> and a .cspec containing all the target platform dependencies (I have a
>> cquery for the tp and one for the projects, as created by the Xtext
>> Buckminster wizard).
>>
>> The cspec for the tp is as follows:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0"
>> name="org.example.releng" componentType="buckminster" version="1.0.0">
>> <cs:dependencies>
>> <cs:dependency name="org.eclipse.platform"
>> componentType="eclipse.feature"/>
>> <cs:dependency name="org.eclipse.xtext.sdk"
>> componentType="eclipse.feature" versionDesignator="[2.4.3,2.5.0)"/>
>> </cs:dependencies>
>> </cs:cspec>
>>
>> I use the versionDesignator because I want to build with Xtext 2.4.3
>> (and not with the recently released 2.5.0 version).
>>
>> The Xtext features in the TP are materialized with the correct version
>> 2.4.3, but some Xtext bundles are materialized twice: with version 2.4.3
>> and 2.5.0.
>>
>> Indeed I get some warnings of the shape
>>
>> [java] WARNING [0042] : Component request
>> org.eclipse.xtext.xbase.lib:osgi.bundle/[2.4.3.v201309030823,2.4.3.v201309030823]
>>
>> is in conflict with request org.eclipse.xtext.xbase.lib:osgi.bundle/2.5.0
>> [java] INFO: TAG-ID 0042 = Query for org.example.releng:buckminster,
>> path: org.example.releng:buckminster$1.0.0 ->
>> org.eclipse.xtext.sdk:eclipse.feature$2.4.3.v201309030823 ->
>> org.eclipse.xtext.xbase:eclipse.feature$2.4.3.v201309030823 ->
>> org.eclipse.xtext.xbase.lib:eclipse.feature$2.4.3.v201309030823
>>
>> am I doing anything wrong? Or is the way Xtext features are deployed?
>>
>> I know that by using advisor nodes in the cquery I could force the
>> versions, but I thought that specifying the version range in the .cspec
>> would be enough...
>>
>> thanks in advance
>> Lorenzo
>>
>

On 2014-01-02 19:15, Lorenzo Bettini wrote:
> On 02/01/2014 13:48, Thomas Hallgren wrote:
>> Hi Lorenzo,
>>
>> The reason you get this warning and multiple xtext versions is that
>> something in your TP still requires
>> org.eclipse.xtext.xbase.lib:osgi.bundle/2.5.0. You'll have to figure out
>> what feature or bundle that does that and then remove it from the equation.
>
> Hi Thomas
>
> the cspec of my TP is the one I wrote in the original message, thus
> basically only
>
> <cs:dependency name="org.eclipse.xtext.sdk"
> componentType="eclipse.feature" versionDesignator="[2.4.3,2.5.0)"/>
>
> no other deps (besides org.eclipse.platform which surely do not have
> deps on any xtext bundle).
>
> Thus, can it be that this is due to some Xtext feature that has an
> "open" version range? And then the resolution will pull in more recent
> versions of xtext bundles?
>
It's possible yes. Buckminster will not retrace individual resolution threads up to the root so if some dependency is
open ended and that in turn has a dependency that requires >= 2.5.0, then the conflict would occur.

You should be able to avoid this by introducing an explicit dependency to a 2.4.x version of the ones that resolve to
2.5.0. I usually use the cspec editor and the resolve wizard to find out what goes on.

On 03/01/2014 10:25, Thomas Hallgren wrote:
> On 2014-01-02 19:15, Lorenzo Bettini wrote:
>> On 02/01/2014 13:48, Thomas Hallgren wrote:
>>> Hi Lorenzo,
>>>
>>> The reason you get this warning and multiple xtext versions is that
>>> something in your TP still requires
>>> org.eclipse.xtext.xbase.lib:osgi.bundle/2.5.0. You'll have to figure out
>>> what feature or bundle that does that and then remove it from the
>>> equation.
>>
>> Hi Thomas
>>
>> the cspec of my TP is the one I wrote in the original message, thus
>> basically only
>>
>> <cs:dependency name="org.eclipse.xtext.sdk"
>> componentType="eclipse.feature" versionDesignator="[2.4.3,2.5.0)"/>
>>
>> no other deps (besides org.eclipse.platform which surely do not have
>> deps on any xtext bundle).
>>
>> Thus, can it be that this is due to some Xtext feature that has an
>> "open" version range? And then the resolution will pull in more recent
>> versions of xtext bundles?
>>
> It's possible yes. Buckminster will not retrace individual resolution
> threads up to the root so if some dependency is open ended and that in
> turn has a dependency that requires >= 2.5.0, then the conflict would
> occur.
>
> You should be able to avoid this by introducing an explicit dependency
> to a 2.4.x version of the ones that resolve to 2.5.0. I usually use the
> cspec editor and the resolve wizard to find out what goes on.