You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Johannes Stamminger <Jo...@astrium.eads.net> on 2007/09/26 19:30:29 UTC

Missing configuration in eviction result

Hi,

we observe the following:

moduleA depends libX-1.+ in conf U
moduleA depends moduleB in conf U,V
moduleB depends libX-[1.5,) in conf U,V
(conf mappings straight forward, U,V->@)

Lates libX version in the repo is e.g. 1.7

Note the slight difference in dependencies to libX versions, once [1.5,) 
meaning - according to the documentation - any version greater or equal 1.5, 
the other one 1.+. Though both will would resolve to 1.7.

As both version descriptions lead to the same resolved version of libX - 1.7 - 
we would expect it to be included in both configurations, U and V. In fact it 
is only in U :-(.

The dependencies report only mentions version [1.5,) with:
evicted by 1.7 in latest-revision conflict manager.


The moment I specify same version rules for both modules, things work as 
expected.

This clearly seems to be a bug to me ... ?


What I am not that sure is how it should behave with having requested it once 
with 1.+ and the other time with 1.5 (with 1.7 being the latest one again). 
IMHO I would again expect libX being included in both configurations again - 
as both resolved versions, 1.5 and 1.7, contain conf U and V ... ?


Kind regards,
Johannes Stamminger

This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------
Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647

Re: Missing configuration in eviction result

Posted by Johannes Stamminger <Jo...@astrium.eads.net>.
Sorry about the subject, it is misleading ... but I recognized it only after 
having sent ... ;-(

This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------
Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647

Re: Missing module in configuration after resolve with latest conflict manager

Posted by Johannes Stamminger <Jo...@astrium.eads.net>.
Hi!

> > Could you open a JIRA issue, with some more details about your settings,
> >
> > > your ivy version, and your ivy files. A junit test reproducing the
> >
> > problem
> >
> > > would be great!
> >
> > IVY-613. When time permits, I will try to provide unit tests.
>
> Ok thanks,

I just added an initial version of testing this defect as attachment to the 
issue (hopefully I did not forget any files).

Note that we are using ivy-1.4.1. We can not switch to any alpga/trunk version 
with our now operable build environment. Though we are willing do patch the 
1.4.1 to come arround critical issues.

It fails due to the resolve report mentioning libX being evicted though IMHO 
with the test data submitted it must not.


Have a nive weekend,
Johannes Stamminger

This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------
Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647

Re: Missing configuration in eviction result

Posted by Johannes Stamminger <Jo...@astrium.eads.net>.
Hi!

On Friday 28 September 2007, Xavier Hanin wrote:
> On 9/28/07, Johannes Stamminger <Jo...@astrium.eads.net>
>
> wrote:
> > Hi!
> >
...

> > I tried to say, that I am not sure if both configurations should be
> > included,
> > if the requested versions defined by the dependencies resolve to
> > different ones (before conflict management), e.g. with modified example
> >
> > moduleB depends libX-1.5 in conf U,V
> >
> > Now, before conflict management, two *different* versions are resolved,
> > 1.5
> > and 1.7. Now 1.5 indeed get's evicted and I was thinking about, if it
> > would
> > be correct to "merge" the requested configurations. Maybe this should be
> > done
> > only for those, being included in both versions?
>
> Until now Ivy has always considered configurations as isolated. So in this
> case you would end up with libX 1.5 in V and 1.7 in U. Changing this

No.

Before conflict management we have libX-1.5 in U *and* V, libX-1.7 in U only.
The latest conflict manager now "simply" throws away the libX-1.5 version and 
doing so "forgets" about the need of libX in conf V.


> behavior would be quite complex, and may lead to some troubles: what

I fear that you are correct here ;-(.


> happens when you resolve only one configuration out of two? I think
> dependency resolution must no depend on how the configurations are
> resolved, so we would have to take care of all configurations resolution
> even when you resolve only one configuration... not a very good idea IMO.

Maybe I misunderstood you (would be easier for me to have an example of that), 
but so far: No, you "just" ;-) have to take care on that one configuration 
you are looking for. And it must not be thrown away on eviction as it 
currently would (in my example on resolving for conf V libX would not get 
included at all).

I did not have a look to the conflict manager's sourcecode, yet, so I do not 
have an idea of how it could be implemented.
But in general speaking I would expect that a dependent lib is kept in all 
requested configurations after conflicts' management - or if the chosen 
version (in my example 1.7) does *not* provide all requested configurations 
(note that this is currently *not* covered by the above example!!!), conflict 
management IMHO has to fail (currently it does not).


An example for a case where ivy should fail to resolve would look like:
libX-1.5 provides confs U,V
libX-1.7 provides conf U only

Now with the dependencies

moduleA depends libX-1.+ in conf U
moduleA depends moduleB in conf U,V
moduleB depends libX-1.5 in conf U,V

it should fail as the latest version chosen libX-1.7 cannot fullfill the need 
for conf V.


Kind regards,
Johannes Stamminger

This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------
Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647

Re: Missing configuration in eviction result

Posted by Xavier Hanin <xa...@gmail.com>.
On 9/28/07, Johannes Stamminger <Jo...@astrium.eads.net>
wrote:
>
>
> Hi!
>
> On Friday 28 September 2007, Xavier Hanin wrote:
> > On 9/26/07, Johannes Stamminger <Jo...@astrium.eads.net>
> >
> > wrote:
> > > Hi,
> > >
> > > we observe the following:
> > >
> > > moduleA depends libX-1.+ in conf U
> > > moduleA depends moduleB in conf U,V
> > > moduleB depends libX-[1.5,) in conf U,V
> > > (conf mappings straight forward, U,V->@)
> > >
> > > Lates libX version in the repo is e.g. 1.7
>
> ...
>
> > What I am not that sure is how it should behave with having requested it
> >
> > > once
> > > with 1.+ and the other time with 1.5 (with 1.7 being the latest one
> > > again).
> > > IMHO I would again expect libX being included in both configurations
> > > again -
> > > as both resolved versions, 1.5 and 1.7, contain conf U and V ... ?
> >
> > I'm not sure of what you say here... you're now talking about 1.5, but I
> > thought you were not asking 1.5 anywhere, only [1.5,) which actually
> > resolves to 1.7. Using the rules [1.5,) or 1.+ should be equivalent in
> your
> > case (since the latest version is 1.7). So if Ivy is lost with these
> two,
> > it's a bug.
>
> I tried to say, that I am not sure if both configurations should be
> included,
> if the requested versions defined by the dependencies resolve to different
> ones (before conflict management), e.g. with modified example
>
> moduleB depends libX-1.5 in conf U,V
>
> Now, before conflict management, two *different* versions are resolved,
> 1.5
> and 1.7. Now 1.5 indeed get's evicted and I was thinking about, if it
> would
> be correct to "merge" the requested configurations. Maybe this should be
> done
> only for those, being included in both versions?


Until now Ivy has always considered configurations as isolated. So in this
case you would end up with libX 1.5 in V and 1.7 in U. Changing this
behavior would be quite complex, and may lead to some troubles: what happens
when you resolve only one configuration out of two? I think dependency
resolution must no depend on how the configurations are resolved, so we
would have to take care of all configurations resolution even when you
resolve only one configuration... not a very good idea IMO.

> Could you open a JIRA issue, with some more details about your settings,
> > your ivy version, and your ivy files. A junit test reproducing the
> problem
> > would be great!
>
> IVY-613. When time permits, I will try to provide unit tests.


Ok thanks,

Xavier

Kind regards,
> Johannes Stamminger
>
> This email (including any attachments) may contain confidential and/or
> privileged information or information otherwise protected from disclosure.
> If you are not the intended recipient, please notify the sender immediately,
> do not copy this message or any attachments and do not use it for any
> purpose or disclose its content to any person, but delete this message and
> any attachments from your system. Astrium disclaims any and all liability if
> this email transmission was virus corrupted, altered or falsified.
> ---------------------------------------------------------
> Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller -
> Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo
> Salame Fischer
> Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen,
> HRB Nr. 107 647
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/

Re: Missing configuration in eviction result

Posted by Johannes Stamminger <Jo...@astrium.eads.net>.
Hi!

On Friday 28 September 2007, Xavier Hanin wrote:
> On 9/26/07, Johannes Stamminger <Jo...@astrium.eads.net>
>
> wrote:
> > Hi,
> >
> > we observe the following:
> >
> > moduleA depends libX-1.+ in conf U
> > moduleA depends moduleB in conf U,V
> > moduleB depends libX-[1.5,) in conf U,V
> > (conf mappings straight forward, U,V->@)
> >
> > Lates libX version in the repo is e.g. 1.7

...

> What I am not that sure is how it should behave with having requested it
>
> > once
> > with 1.+ and the other time with 1.5 (with 1.7 being the latest one
> > again).
> > IMHO I would again expect libX being included in both configurations
> > again -
> > as both resolved versions, 1.5 and 1.7, contain conf U and V ... ?
>
> I'm not sure of what you say here... you're now talking about 1.5, but I
> thought you were not asking 1.5 anywhere, only [1.5,) which actually
> resolves to 1.7. Using the rules [1.5,) or 1.+ should be equivalent in your
> case (since the latest version is 1.7). So if Ivy is lost with these two,
> it's a bug.

I tried to say, that I am not sure if both configurations should be included, 
if the requested versions defined by the dependencies resolve to different 
ones (before conflict management), e.g. with modified example

moduleB depends libX-1.5 in conf U,V

Now, before conflict management, two *different* versions are resolved, 1.5 
and 1.7. Now 1.5 indeed get's evicted and I was thinking about, if it would 
be correct to "merge" the requested configurations. Maybe this should be done 
only for those, being included in both versions?


> Could you open a JIRA issue, with some more details about your settings,
> your ivy version, and your ivy files. A junit test reproducing the problem
> would be great!

IVY-613. When time permits, I will try to provide unit tests.


Kind regards,
Johannes Stamminger

This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------
Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647

Re: Missing configuration in eviction result

Posted by Xavier Hanin <xa...@gmail.com>.
On 9/26/07, Johannes Stamminger <Jo...@astrium.eads.net>
wrote:
>
>
> Hi,
>
> we observe the following:
>
> moduleA depends libX-1.+ in conf U
> moduleA depends moduleB in conf U,V
> moduleB depends libX-[1.5,) in conf U,V
> (conf mappings straight forward, U,V->@)
>
> Lates libX version in the repo is e.g. 1.7
>
> Note the slight difference in dependencies to libX versions, once [1.5,)
> meaning - according to the documentation - any version greater or equal
> 1.5,
> the other one 1.+. Though both will would resolve to 1.7.
>
> As both version descriptions lead to the same resolved version of libX -
> 1.7 -
> we would expect it to be included in both configurations, U and V. In fact
> it
> is only in U :-(.


Indeed, it should be included in both.

The dependencies report only mentions version [1.5,) with:
> evicted by 1.7 in latest-revision conflict manager.


This is not normal, even though in your case [1.5,) evicted by 1.7 is not a
problem since [1.5,) is the same as 1.7. But the message is misleading at
least.

The moment I specify same version rules for both modules, things work as
> expected.
>
> This clearly seems to be a bug to me ... ?


Indeed.

What I am not that sure is how it should behave with having requested it
> once
> with 1.+ and the other time with 1.5 (with 1.7 being the latest one
> again).
> IMHO I would again expect libX being included in both configurations again
> -
> as both resolved versions, 1.5 and 1.7, contain conf U and V ... ?


I'm not sure of what you say here... you're now talking about 1.5, but I
thought you were not asking 1.5 anywhere, only [1.5,) which actually
resolves to 1.7. Using the rules [1.5,) or 1.+ should be equivalent in your
case (since the latest version is 1.7). So if Ivy is lost with these two,
it's a bug.

Could you open a JIRA issue, with some more details about your settings,
your ivy version, and your ivy files. A junit test reproducing the problem
would be great!

Xavier

Kind regards,
> Johannes Stamminger
>
> This email (including any attachments) may contain confidential and/or
> privileged information or information otherwise protected from disclosure.
> If you are not the intended recipient, please notify the sender immediately,
> do not copy this message or any attachments and do not use it for any
> purpose or disclose its content to any person, but delete this message and
> any attachments from your system. Astrium disclaims any and all liability if
> this email transmission was virus corrupted, altered or falsified.
> ---------------------------------------------------------
> Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller -
> Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo
> Salame Fischer
> Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen,
> HRB Nr. 107 647
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/