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 2008/03/28 18:56:03 UTC
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
just my 2 cents (maybe I am completely wrong as I did not follow the
discussion in all detail and the tread is rather long ... and it is friday
eventing here :-)):
the exclude and override I could imagine that it would make sense to specify
them per dependency - not only globally for all dependencies ... ?
On Friday 28 March 2008, Xavier Hanin wrote:
> On Fri, Mar 28, 2008 at 6:38 PM, Niklas Matthies <ml...@nmhq.net>
>
> wrote:
> > On Fri 2008-03-28 at 17:24h, Xavier Hanin wrote on ivy-user:
> > > FYI, I've just checked in code which uses the proposed syntax. Here's
> > > an extract of an ivy file used in ivy file parsing test:
> > > <dependencies>
> > > [...]
> > > <dependency org="yourorg" name="yourmodule11" rev="11.1"
> >
> > conf="*->@"/>
> >
> > > <hints>
> > > <exclude module="*servlet*" matcher="glob" conf="myconf1"
> > > /> <exclude org="acme" module="test" artifact="test"
> >
> > type="source" ext="jar" />
> >
> > > <conflict org="yourorg" module=".*" matcher="regexp"
> >
> > manager="all" />
> >
> > > <conflict org="theirorg" module="theirmodule1" rev="1.0,
> > > 1.1
> >
> > "/>
> >
> > > <override org="yourorg" module=".*1" matcher="regexp"
> >
> > branch="BRANCH" rev="1.0" />
> >
> > > </hints>
> > > </dependencies>
> > >
> > > This is still open to discussion, if you have better ideas for the
> >
> > syntax,
> >
> > > or a better name than 'hints', please give feedback before we cut next
> > > release.
> >
> > How about just placing these elements directly under <dependencies>?
> > This would read pretty natural to me.
>
> It would at least avoid to find a better word than "hints" :-) I'm fine
> with putting them directly under dependencies. What do others think?
>
> Xavier
>
> > -- Niklas Matthies
--
Johannes.Stamminger@Astrium.EADS.net [2FE783D0 http://wwwkeys.PGP.net]
------ ----<--{(@ ------------------ EADS ASTRIUM
Koenigsberger Str. 17, 28857 Barrien Ground System Eng. (TE55)
+49 4242 169582 (Tel + FAX) Airbus Allee 1, 28199 Bremen
+49 174 7731593 (Mobile) +49 421 539 4152 (Tel) / 4378 (FAX)
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, Guenter Stamerjohanns
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647
Weitere Informationen ueber EADS Astrium @ http://www.astrium.eads.net/
Re: specify versions separate from dependencies
Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 31, 2008 at 2:30 PM, Johannes Stamminger <
Johannes.Stamminger@astrium.eads.net> wrote:
>
> On Monday 31 March 2008, Xavier Hanin wrote:
> > Exclude can already be applied per dependency, it's even the first case
> of
> > exclusion supported by Ivy. In this case, the module or set of modules
> is
> > excluded only from the transitive set of dependencies resolved for the
> > direct dependency on which the exclusion is defined, and has no impact
> on
> > other dependencies. So if you want to make sure you don't get one
> module,
> > you should use global exclude.
>
> Same for override? The usecase would look very similar to the one for
> exclude.
I agree, the use case is pretty similar, so it would make sense to support
override per dependency too. I'm not sure we will have enough time to
implement this in 2.0.0 though.
Xavier
>
>
> Johannes Stamminger
> --
> Johannes.Stamminger@Astrium.EADS.net [2FE783D0 http://wwwkeys.PGP.net]
> ------ ----<--{(@ ------------------ EADS ASTRIUM
> Koenigsberger Str. 17, 28857 Barrien Ground System Eng. (TE55)
> +49 4242 169582 (Tel + FAX) Airbus Allee 1, 28199 Bremen
> +49 174 7731593 (Mobile) +49 421 539 4152 (Tel) / 4378 (FAX)
>
> 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, Guenter Stamerjohanns
> Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen,
> HRB Nr. 107 647
>
> Weitere Informationen ueber EADS Astrium @ http://www.astrium.eads.net/
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: specify versions separate from dependencies
Posted by Johannes Stamminger <Jo...@astrium.eads.net>.
On Monday 31 March 2008, Xavier Hanin wrote:
> Exclude can already be applied per dependency, it's even the first case of
> exclusion supported by Ivy. In this case, the module or set of modules is
> excluded only from the transitive set of dependencies resolved for the
> direct dependency on which the exclusion is defined, and has no impact on
> other dependencies. So if you want to make sure you don't get one module,
> you should use global exclude.
Same for override? The usecase would look very similar to the one for exclude.
Johannes Stamminger
--
Johannes.Stamminger@Astrium.EADS.net [2FE783D0 http://wwwkeys.PGP.net]
------ ----<--{(@ ------------------ EADS ASTRIUM
Koenigsberger Str. 17, 28857 Barrien Ground System Eng. (TE55)
+49 4242 169582 (Tel + FAX) Airbus Allee 1, 28199 Bremen
+49 174 7731593 (Mobile) +49 421 539 4152 (Tel) / 4378 (FAX)
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, Guenter Stamerjohanns
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647
Weitere Informationen ueber EADS Astrium @ http://www.astrium.eads.net/
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 31, 2008 at 12:17 PM, Niklas Matthies <ml...@nmhq.net>
wrote:
> On Mon 2008-03-31 at 08:39h, Johannes Stamminger wrote on ivy-user:
> > On Saturday 29 March 2008, Gilles Scokart wrote:
> > > On 28/03/2008, Johannes Stamminger <
> Johannes.Stamminger@astrium.eads.net> wrote:
> :
> > > > the exclude and override I could imagine that it would make sense
> to
> > > > specify them per dependency - not only globally for all dependencies
> ...
> > > > ?
> > >
> > > Why would you exclude or overwrite it for one dependency but not for
> the
> > > others?
> :
> > P1 -> L1 -> L2
> > and
> > P1 -> L3 -> L2
> >
> > With the global exclude L2 still is not in P1 though it is needed
> > now. With specifying it only for the dependency to L1, people in P1
> > get triggered to analyse the dependency again (when detecting the
> > newly included L2). With specifying it globally one runs into
> > problems in worst case (dynamic load of L2 in L1) only very late.
>
> I wonder how the semantics is intended to be anyway (by Ivy).
> What if L1 excludes (some revisions of) L2 because it isn't compatible
> with them? Can L3 cause such in incompatible revision to be included
> anyway? What if L3 uses <override>?
>
> In that light, it seems to me that applying exclude/override globally
> is the only thing that makes sense. The logic by which Ivy prunes
> dependency subtrees is based on the assumption that it doesn't matter
> in which order conflicts are considered; that the result will be the
> same regardless of the order. Exclude/override/conflict do break that
> assumption, unless they are applied globally.
Exclude can already be applied per dependency, it's even the first case of
exclusion supported by Ivy. In this case, the module or set of modules is
excluded only from the transitive set of dependencies resolved for the
direct dependency on which the exclusion is defined, and has no impact on
other dependencies. So if you want to make sure you don't get one module,
you should use global exclude.
BTW, it seems most people like having exclude/override/conflict directly
under dependencies, so I'll go this way, update code and documentation to
support that. Thanks everybody for your feedback.
Xavier
>
> -- Niklas Matthies
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 31, 2008 at 3:59 PM, Gilles Scokart <gs...@gmail.com> wrote:
> On 31/03/2008, Xavier Hanin <xa...@gmail.com> wrote:
> > On Mon, Mar 31, 2008 at 2:27 PM, Gilles Scokart <gs...@gmail.com>
> wrote:
> >
> > > On 31/03/2008, Niklas Matthies <ml...@nmhq.net> wrote:
> > > > On Mon 2008-03-31 at 08:39h, Johannes Stamminger wrote on ivy-user:
> > > >
> > > > > On Saturday 29 March 2008, Gilles Scokart wrote:
> > > > > > On 28/03/2008, Johannes Stamminger <
> > > Johannes.Stamminger@astrium.eads.net> wrote:
> > > >
> > > > :
> > > > > > > the exclude and override I could imagine that it would make
> > > sense to
> > > > > > > specify them per dependency - not only globally for all
> > > dependencies ...
> > > > > > > ?
> > > > > >
> > > > > > Why would you exclude or overwrite it for one dependency but
> not
> > > for the
> > > > > > others?
> > > >
> > > > :
> > > > > P1 -> L1 -> L2
> > > > > and
> > > > > P1 -> L3 -> L2
> > > > >
> > > > > With the global exclude L2 still is not in P1 though it is
> needed
> > > > > now. With specifying it only for the dependency to L1, people in
> P1
> > > > > get triggered to analyse the dependency again (when detecting
> the
> > > > > newly included L2). With specifying it globally one runs into
> > > > > problems in worst case (dynamic load of L2 in L1) only very
> late.
> > > >
> > > >
> > > > I wonder how the semantics is intended to be anyway (by Ivy).
> > > > What if L1 excludes (some revisions of) L2 because it isn't
> compatible
> > > > with them? Can L3 cause such in incompatible revision to be
> included
> > > > anyway? What if L3 uses <override>?
> > > >
> > > > In that light, it seems to me that applying exclude/override
> globally
> > > > is the only thing that makes sense. The logic by which Ivy prunes
> > > > dependency subtrees is based on the assumption that it doesn't
> matter
> > > > in which order conflicts are considered; that the result will be
> the
> > > > same regardless of the order. Exclude/override/conflict do break
> that
> > > > assumption, unless they are applied globally.
> > > >
> > > >
> > > > -- Niklas Matthies
> > > >
> > >
> > > Ugh. You see it more globally than me.
> > > I was just thinking it is only usefull at a global level, meaning
> > > accros all the dependency of a module.
> > > You pinpoint (rightfully I think) that it only make sense even more
> > > globaly, accross all the modules that may depends on you.
> > > It looks like we will need to manage the conflicts between
> > > exclusion/overwrite/conflict managment ??
> >
> >
> > I don't think it's a problem. The implementation currently works like
> this:
> > override is used to override a dependency descriptor, so that Ivy
> behave
> > *exactly* as if the dependency has been declared with the overriding
> value.
> > exclude works by excluding the dependency from the tree, exactly as if
> the
> > dependency was not declared. As such it beats override.
> > conflict is used only when there is a conflict, after exclude/override
> which
> > are used at metadata level, while conflict management is used at
> resolution
> > level
> >
> > It's still your responsibility when you write a module descriptor to
> perform
> > the required exclude/override/conflict management to make sure you get
> a set
> > of compatible dependencies.
> >
> > This seems fine to me. Do you foresee any problem?
> >
> > Xavier
> >
> >
>
> Well, the use case presented by Niklas is not covered : What if I want
> to exclude a transitive dependency because I'm incompatible with it?
> Maybe I want to tell to my users "hey, never run my code with this
> depdendency!".
>
> Is this scenario realist? I don't know?
I think you can't give that much power to a module. If the caller really
want to use the module with another "incompatible" one, it's up to him.
Maybe he will just load it in a separate classloader, you never know. I
think current system with new mechanism already offers a good deal of
flexibility and control, and we'll later see if we need new mechanisms. But
I think this goes beyond the scope of this discussion and the target for
2.0.0.
Xavier
>
>
> --
> Gilles Scokart
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: specify versions separate from dependencies
Posted by Niklas Matthies <ml...@nmhq.net>.
On Mon 2008-03-31 at 19:24h, Xavier Hanin wrote on ivy-user:
> On Mon, Mar 31, 2008 at 7:00 PM, Niklas Matthies wrote:
:
> > It's all fine (only) as long you control all the modules involved.
> > But in that case, why wouldn't you simply specify these features
> > globally for your build?
>
> Fine. And specifying globally for the build will somewhat be possible with
> module descriptor inclusion: define a root module descriptor defining your
> excludes, and include this descriptor in all your modules, and you're done.
Maybe I've been too subtle ;). I'm not asking for a new feature here.
The root module descriptor usage is crystal clear to me, and it is
obviously(?) the use case for which the features under discussion are
being introduced/generalized, and yes of course it is covered by them.
No dispute here whatsoever.
What I was trying to get at - while trying not to step on anyone's
toes - is whether these features, as currently envisioned (or already
implemented), aren't actually harmful for the client side (= published
Ivy file), and whether it wouldn't be worth reconsidering how they are
implemented, rather now than later, to avoid having regrets later on
when things can't be changed any more due to having to maintain
backwards compatibility.
As I wrote, it seems to me that having these features in published Ivy
files breaks basic assumptions of Ivy's dependency model (such as the
commutativity and associativity of conflict resolution) and is quite
prone to lead to unintelligible and subtly changing resolution
behavior in non-trivial scenarios.
I was hoping for an exchange of ideas of how these features could be
amended such that the problems mentioned above are avoided, while
still satisfying the actual use cases. Just as an example, one
possible way could be to disallow/not support these features in
non-root modules during dependency resolution. I don't know whether
that would fit the implementation, and wouldn't break any valid use
cases, it's just an example of the kind of approaches I was aiming at.
-- Niklas Matthies
Re: specify versions separate from dependencies
Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 31, 2008 at 7:00 PM, Niklas Matthies <ml...@nmhq.net>
wrote:
> On Mon 2008-03-31 at 18:20h, Xavier Hanin wrote on ivy-user:
> :
> > OTOH, feel free to open an issue in JIRA detailing what you'd like
> > to have (letting a module exclude another one in whole dependency
> > graph).
>
> My feeling is that this is rather about what I *don't* want to have. ;)
> I'm worried about having such modules as dependencies one day, and
> having to work around their published exclude/override/conflict
> directives with yet more such directives in my own modules, and
> possibly having to tell the clients of my own modules to do the same.
>
> It's all fine (only) as long you control all the modules involved.
> But in that case, why wouldn't you simply specify these features
> globally for your build?
Fine. And specifying globally for the build will somewhat be possible with
module descriptor inclusion: define a root module descriptor defining your
excludes, and include this descriptor in all your modules, and you're done.
Xavier
>
>
> -- Niklas Matthies
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: specify versions separate from dependencies
Posted by Niklas Matthies <ml...@nmhq.net>.
On Mon 2008-03-31 at 18:20h, Xavier Hanin wrote on ivy-user:
:
> OTOH, feel free to open an issue in JIRA detailing what you'd like
> to have (letting a module exclude another one in whole dependency
> graph).
My feeling is that this is rather about what I *don't* want to have. ;)
I'm worried about having such modules as dependencies one day, and
having to work around their published exclude/override/conflict
directives with yet more such directives in my own modules, and
possibly having to tell the clients of my own modules to do the same.
It's all fine (only) as long you control all the modules involved.
But in that case, why wouldn't you simply specify these features
globally for your build?
-- Niklas Matthies
Re: specify versions separate from dependencies
Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 31, 2008 at 5:05 PM, Niklas Matthies <ml...@nmhq.net>
wrote:
> On Mon 2008-03-31 at 15:59h, Gilles Scokart wrote on ivy-user:
> :
> > Well, the use case presented by Niklas is not covered : What if I want
> > to exclude a transitive dependency because I'm incompatible with it?
> > Maybe I want to tell to my users "hey, never run my code with this
> > depdendency!".
> >
> > Is this scenario realist? I don't know?
>
> One important question (I think) is: If someone has published a module
> with a descriptor containing an exclude, what should that tell a
> client using that module? It would be very bad if the client had to
> make sure that none of its other dependencies doesn't include the
> exluded dependency. This would effectively mean that exclude
> directives have to be manually propagated up to the root of the
> dependency tree (and be added to all published descriptors of modules
> along the way). It gets worse when the exclusions evolve over the
> revision history of the excluding module. If, on the other hand, the
> published module is fine with the excluded dependency being imported
> via other modules, then the question is what it really meant by
> excluding the dependency.
>
> There are similar questions for <override> and <conflict>.
> E.g. if I have a module D depending on modules B and C, which both
> transitively depend on a module A, and the descriptor of B specifies
> conflict manager X for A, and module B specifies conflict manager Y
> for A, and my module D uses the default conflict manager to resolve
> conflicts between revisions of A returned by B and C, will B and C be
> happy with the result? And this process is complicated by the fact
> that descriptors are revision-dependent, i.e. it's not really B and C
> that specify conflict managers, it's specific revisions of B and C
> that might specify different conflict managers. Ignoring the complex
> mess that this already creates ;), the <conflict> directives of some
> module B should only be applied after it is known which revision of B
> is ultimately selected, to get consistent results. For example, if you
> have something like (using proper notation ;)):
>
> #D -> {
> #B;1 -> {
> #F;1 -> ... -> #A;1
> #G;1 -> ... -> #A;2
> }
> #H -> ... -> #B;2 -> {
> #F;2 -> ... -> #A;3
> #G;2 -> ... -> #A;4
> }
> }
>
> and #B;2 specifies a different conflict manager for #A than #B;1,
> then if the conflict between #A;1 and #A;2 or between #A;3 and #A;4
> is resolved before the conflict between #B;1 and #B;2 is resolved,
> then the resulting revision of #A may depend on the order on wich the
> direct dependencies of #D (i.e. #B;1 and #H) are traversed. (Note that
> (the author/user of) #D might not even be aware of the fact that #H
> uses #B.) It is my understanding that Ivy intends to define a
> dependency resolution mechanism that is not order-dependent (unlike
> the mess you get with Maven ;)).
You raise some very interesting issues, along with a good understanding of
the complexity behind implementing this kind of feature. IMO, letting a
module give rules for the caller is really a complex feature which requires
a lot of design and testing. I don't think we are ready to go into this kind
of feature yet, so I'd keep the exclude/override/conflict feature as
implemented ATM. OTOH, feel free to open an issue in JIRA detailing what
you'd like to have (letting a module exclude another one in whole dependency
graph).
Xavier
>
>
> -- Niklas Matthies
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: specify versions separate from dependencies
Posted by Niklas Matthies <ml...@nmhq.net>.
On Mon 2008-03-31 at 15:59h, Gilles Scokart wrote on ivy-user:
:
> Well, the use case presented by Niklas is not covered : What if I want
> to exclude a transitive dependency because I'm incompatible with it?
> Maybe I want to tell to my users "hey, never run my code with this
> depdendency!".
>
> Is this scenario realist? I don't know?
One important question (I think) is: If someone has published a module
with a descriptor containing an exclude, what should that tell a
client using that module? It would be very bad if the client had to
make sure that none of its other dependencies doesn't include the
exluded dependency. This would effectively mean that exclude
directives have to be manually propagated up to the root of the
dependency tree (and be added to all published descriptors of modules
along the way). It gets worse when the exclusions evolve over the
revision history of the excluding module. If, on the other hand, the
published module is fine with the excluded dependency being imported
via other modules, then the question is what it really meant by
excluding the dependency.
There are similar questions for <override> and <conflict>.
E.g. if I have a module D depending on modules B and C, which both
transitively depend on a module A, and the descriptor of B specifies
conflict manager X for A, and module B specifies conflict manager Y
for A, and my module D uses the default conflict manager to resolve
conflicts between revisions of A returned by B and C, will B and C be
happy with the result? And this process is complicated by the fact
that descriptors are revision-dependent, i.e. it's not really B and C
that specify conflict managers, it's specific revisions of B and C
that might specify different conflict managers. Ignoring the complex
mess that this already creates ;), the <conflict> directives of some
module B should only be applied after it is known which revision of B
is ultimately selected, to get consistent results. For example, if you
have something like (using proper notation ;)):
#D -> {
#B;1 -> {
#F;1 -> ... -> #A;1
#G;1 -> ... -> #A;2
}
#H -> ... -> #B;2 -> {
#F;2 -> ... -> #A;3
#G;2 -> ... -> #A;4
}
}
and #B;2 specifies a different conflict manager for #A than #B;1,
then if the conflict between #A;1 and #A;2 or between #A;3 and #A;4
is resolved before the conflict between #B;1 and #B;2 is resolved,
then the resulting revision of #A may depend on the order on wich the
direct dependencies of #D (i.e. #B;1 and #H) are traversed. (Note that
(the author/user of) #D might not even be aware of the fact that #H
uses #B.) It is my understanding that Ivy intends to define a
dependency resolution mechanism that is not order-dependent (unlike
the mess you get with Maven ;)).
-- Niklas Matthies
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Gilles Scokart <gs...@gmail.com>.
On 31/03/2008, Xavier Hanin <xa...@gmail.com> wrote:
> On Mon, Mar 31, 2008 at 2:27 PM, Gilles Scokart <gs...@gmail.com> wrote:
>
> > On 31/03/2008, Niklas Matthies <ml...@nmhq.net> wrote:
> > > On Mon 2008-03-31 at 08:39h, Johannes Stamminger wrote on ivy-user:
> > >
> > > > On Saturday 29 March 2008, Gilles Scokart wrote:
> > > > > On 28/03/2008, Johannes Stamminger <
> > Johannes.Stamminger@astrium.eads.net> wrote:
> > >
> > > :
> > > > > > the exclude and override I could imagine that it would make
> > sense to
> > > > > > specify them per dependency - not only globally for all
> > dependencies ...
> > > > > > ?
> > > > >
> > > > > Why would you exclude or overwrite it for one dependency but not
> > for the
> > > > > others?
> > >
> > > :
> > > > P1 -> L1 -> L2
> > > > and
> > > > P1 -> L3 -> L2
> > > >
> > > > With the global exclude L2 still is not in P1 though it is needed
> > > > now. With specifying it only for the dependency to L1, people in P1
> > > > get triggered to analyse the dependency again (when detecting the
> > > > newly included L2). With specifying it globally one runs into
> > > > problems in worst case (dynamic load of L2 in L1) only very late.
> > >
> > >
> > > I wonder how the semantics is intended to be anyway (by Ivy).
> > > What if L1 excludes (some revisions of) L2 because it isn't compatible
> > > with them? Can L3 cause such in incompatible revision to be included
> > > anyway? What if L3 uses <override>?
> > >
> > > In that light, it seems to me that applying exclude/override globally
> > > is the only thing that makes sense. The logic by which Ivy prunes
> > > dependency subtrees is based on the assumption that it doesn't matter
> > > in which order conflicts are considered; that the result will be the
> > > same regardless of the order. Exclude/override/conflict do break that
> > > assumption, unless they are applied globally.
> > >
> > >
> > > -- Niklas Matthies
> > >
> >
> > Ugh. You see it more globally than me.
> > I was just thinking it is only usefull at a global level, meaning
> > accros all the dependency of a module.
> > You pinpoint (rightfully I think) that it only make sense even more
> > globaly, accross all the modules that may depends on you.
> > It looks like we will need to manage the conflicts between
> > exclusion/overwrite/conflict managment ??
>
>
> I don't think it's a problem. The implementation currently works like this:
> override is used to override a dependency descriptor, so that Ivy behave
> *exactly* as if the dependency has been declared with the overriding value.
> exclude works by excluding the dependency from the tree, exactly as if the
> dependency was not declared. As such it beats override.
> conflict is used only when there is a conflict, after exclude/override which
> are used at metadata level, while conflict management is used at resolution
> level
>
> It's still your responsibility when you write a module descriptor to perform
> the required exclude/override/conflict management to make sure you get a set
> of compatible dependencies.
>
> This seems fine to me. Do you foresee any problem?
>
> Xavier
>
>
Well, the use case presented by Niklas is not covered : What if I want
to exclude a transitive dependency because I'm incompatible with it?
Maybe I want to tell to my users "hey, never run my code with this
depdendency!".
Is this scenario realist? I don't know?
--
Gilles Scokart
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 31, 2008 at 2:27 PM, Gilles Scokart <gs...@gmail.com> wrote:
> On 31/03/2008, Niklas Matthies <ml...@nmhq.net> wrote:
> > On Mon 2008-03-31 at 08:39h, Johannes Stamminger wrote on ivy-user:
> >
> > > On Saturday 29 March 2008, Gilles Scokart wrote:
> > > > On 28/03/2008, Johannes Stamminger <
> Johannes.Stamminger@astrium.eads.net> wrote:
> >
> > :
> > > > > the exclude and override I could imagine that it would make
> sense to
> > > > > specify them per dependency - not only globally for all
> dependencies ...
> > > > > ?
> > > >
> > > > Why would you exclude or overwrite it for one dependency but not
> for the
> > > > others?
> >
> > :
> > > P1 -> L1 -> L2
> > > and
> > > P1 -> L3 -> L2
> > >
> > > With the global exclude L2 still is not in P1 though it is needed
> > > now. With specifying it only for the dependency to L1, people in P1
> > > get triggered to analyse the dependency again (when detecting the
> > > newly included L2). With specifying it globally one runs into
> > > problems in worst case (dynamic load of L2 in L1) only very late.
> >
> >
> > I wonder how the semantics is intended to be anyway (by Ivy).
> > What if L1 excludes (some revisions of) L2 because it isn't compatible
> > with them? Can L3 cause such in incompatible revision to be included
> > anyway? What if L3 uses <override>?
> >
> > In that light, it seems to me that applying exclude/override globally
> > is the only thing that makes sense. The logic by which Ivy prunes
> > dependency subtrees is based on the assumption that it doesn't matter
> > in which order conflicts are considered; that the result will be the
> > same regardless of the order. Exclude/override/conflict do break that
> > assumption, unless they are applied globally.
> >
> >
> > -- Niklas Matthies
> >
>
> Ugh. You see it more globally than me.
> I was just thinking it is only usefull at a global level, meaning
> accros all the dependency of a module.
> You pinpoint (rightfully I think) that it only make sense even more
> globaly, accross all the modules that may depends on you.
> It looks like we will need to manage the conflicts between
> exclusion/overwrite/conflict managment ??
I don't think it's a problem. The implementation currently works like this:
override is used to override a dependency descriptor, so that Ivy behave
*exactly* as if the dependency has been declared with the overriding value.
exclude works by excluding the dependency from the tree, exactly as if the
dependency was not declared. As such it beats override.
conflict is used only when there is a conflict, after exclude/override which
are used at metadata level, while conflict management is used at resolution
level
It's still your responsibility when you write a module descriptor to perform
the required exclude/override/conflict management to make sure you get a set
of compatible dependencies.
This seems fine to me. Do you foresee any problem?
Xavier
>
>
>
>
>
> --
> Gilles Scokart
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Gilles Scokart <gs...@gmail.com>.
On 31/03/2008, Niklas Matthies <ml...@nmhq.net> wrote:
> On Mon 2008-03-31 at 08:39h, Johannes Stamminger wrote on ivy-user:
>
> > On Saturday 29 March 2008, Gilles Scokart wrote:
> > > On 28/03/2008, Johannes Stamminger <Jo...@astrium.eads.net> wrote:
>
> :
> > > > the exclude and override I could imagine that it would make sense to
> > > > specify them per dependency - not only globally for all dependencies ...
> > > > ?
> > >
> > > Why would you exclude or overwrite it for one dependency but not for the
> > > others?
>
> :
> > P1 -> L1 -> L2
> > and
> > P1 -> L3 -> L2
> >
> > With the global exclude L2 still is not in P1 though it is needed
> > now. With specifying it only for the dependency to L1, people in P1
> > get triggered to analyse the dependency again (when detecting the
> > newly included L2). With specifying it globally one runs into
> > problems in worst case (dynamic load of L2 in L1) only very late.
>
>
> I wonder how the semantics is intended to be anyway (by Ivy).
> What if L1 excludes (some revisions of) L2 because it isn't compatible
> with them? Can L3 cause such in incompatible revision to be included
> anyway? What if L3 uses <override>?
>
> In that light, it seems to me that applying exclude/override globally
> is the only thing that makes sense. The logic by which Ivy prunes
> dependency subtrees is based on the assumption that it doesn't matter
> in which order conflicts are considered; that the result will be the
> same regardless of the order. Exclude/override/conflict do break that
> assumption, unless they are applied globally.
>
>
> -- Niklas Matthies
>
Ugh. You see it more globally than me.
I was just thinking it is only usefull at a global level, meaning
accros all the dependency of a module.
You pinpoint (rightfully I think) that it only make sense even more
globaly, accross all the modules that may depends on you.
It looks like we will need to manage the conflicts between
exclusion/overwrite/conflict managment ??
--
Gilles Scokart
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Niklas Matthies <ml...@nmhq.net>.
On Mon 2008-03-31 at 08:39h, Johannes Stamminger wrote on ivy-user:
> On Saturday 29 March 2008, Gilles Scokart wrote:
> > On 28/03/2008, Johannes Stamminger <Jo...@astrium.eads.net> wrote:
:
> > > the exclude and override I could imagine that it would make sense to
> > > specify them per dependency - not only globally for all dependencies ...
> > > ?
> >
> > Why would you exclude or overwrite it for one dependency but not for the
> > others?
:
> P1 -> L1 -> L2
> and
> P1 -> L3 -> L2
>
> With the global exclude L2 still is not in P1 though it is needed
> now. With specifying it only for the dependency to L1, people in P1
> get triggered to analyse the dependency again (when detecting the
> newly included L2). With specifying it globally one runs into
> problems in worst case (dynamic load of L2 in L1) only very late.
I wonder how the semantics is intended to be anyway (by Ivy).
What if L1 excludes (some revisions of) L2 because it isn't compatible
with them? Can L3 cause such in incompatible revision to be included
anyway? What if L3 uses <override>?
In that light, it seems to me that applying exclude/override globally
is the only thing that makes sense. The logic by which Ivy prunes
dependency subtrees is based on the assumption that it doesn't matter
in which order conflicts are considered; that the result will be the
same regardless of the order. Exclude/override/conflict do break that
assumption, unless they are applied globally.
-- Niklas Matthies
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Johannes Stamminger <Jo...@astrium.eads.net>.
On Saturday 29 March 2008, Gilles Scokart wrote:
> On 28/03/2008, Johannes Stamminger <Jo...@astrium.eads.net>
wrote:
> > just my 2 cents (maybe I am completely wrong as I did not follow the
> > discussion in all detail and the tread is rather long ... and it is
> > friday eventing here :-)):
> >
> > the exclude and override I could imagine that it would make sense to
> > specify them per dependency - not only globally for all dependencies ...
> > ?
>
> Why would you exclude or overwrite it for one dependency but not for the
> others?
Due to a possible change of dependent libs:
E.g. for exclusion: when first setting up dependencies one might have
P1 -> L1 -> L2
and
P1 -> L3
And now per analysis it is decided that in P1 nothing of L1 is reffed that
needs L2.
Now L3 changes and one has:
P1 -> L1 -> L2
and
P1 -> L3 -> L2
With the global exclude L2 still is not in P1 though it is needed now. With
specifying it only for the dependency to L1, people in P1 get triggered to
analyse the dependency again (when detecting the newly included L2). With
specifying it globally one runs into problems in worst case (dynamic load of
L2 in L1) only very late.
>
> Concerning the idea to put the new tags directly under dependencies, I like
> it.
Me too.
Johannes Stamminger
--
Johannes.Stamminger@Astrium.EADS.net [2FE783D0 http://wwwkeys.PGP.net]
------ ----<--{(@ ------------------ EADS ASTRIUM
Koenigsberger Str. 17, 28857 Barrien Ground System Eng. (TE55)
+49 4242 169582 (Tel + FAX) Airbus Allee 1, 28199 Bremen
+49 174 7731593 (Mobile) +49 421 539 4152 (Tel) / 4378 (FAX)
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, Guenter Stamerjohanns
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647
Weitere Informationen ueber EADS Astrium @ http://www.astrium.eads.net/
Re: [LIKELY_SPAM]Re: specify versions separate from dependencies
Posted by Gilles Scokart <gs...@gmail.com>.
On 28/03/2008, Johannes Stamminger <Jo...@astrium.eads.net> wrote:
>
> just my 2 cents (maybe I am completely wrong as I did not follow the
> discussion in all detail and the tread is rather long ... and it is friday
> eventing here :-)):
>
> the exclude and override I could imagine that it would make sense to specify
> them per dependency - not only globally for all dependencies ... ?
>
>
Why would you exclude or overwrite it for one dependency but not for the others?
Concerning the idea to put the new tags directly under dependencies, I like it.
--
Gilles Scokart