ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Myers <>
Subject Re: AW: Better Determine conflicting dependencies
Date Wed, 16 Dec 2009 19:47:46 GMT
Thanks Garima and Klaas - both suggestions sound helpful, and like a 
great place to start.


Klaas Prause wrote:
> Hi,
> ivy provides some help for this using the dependency report. If you are using the graph
you get a clear view how the dependency tree looks like. The html output provides the same
information in a textual representation. The report would be a good starting point, because
it contains the complete resolve informations. I guess that you are using the "resolve" target?
There is a setting/flag to do not fail on an error, maybe you get more output or at least
all errors if you use this setting.
> Regards Klaas
> -----Urspr√ľngliche Nachricht-----
> Von: Carl Myers [] 
> Gesendet: Mittwoch, 16. Dezember 2009 01:35
> An:
> Betreff: Better Determine conflicting dependencies
> Hey all,
> It seems like a common problem (the way we are using ivy) to run into 
> conflicts.  Unfortunately, if your dependency tree looks like this:
> A: B C D E
> C: F G
> G: H-1.0
> E: Z
> Z: H-1.1
> Here I have a conflict and get the message "H-1.0 (required by G) 
> conflicts with H-1.1 (required by Z)".
> Unfortunately, I am building A, and I have no clue where H comes from. 
> If I look at my ivy.xml (the only ivy.xml that I have checked out and 
> handy) all I see are A, B, C, D, and E.  I have potentially never heard 
> of Z or G, nor do I care.  Some dependency changed and boned me, and I 
> need more information than that to figure out how to fix it.
> Specifically, I need the all packages on the path to the "lowest common 
> ancestor" of the two conflicting packages in my dependency tree.  In 
> this example, I would like to see:
> H-1.1 (A->E->Z->H-1.1) conflicts with H-1.0 (A->C->G->H-1.0)
> This should include the version numbers too, I am just leaving them out 
> for clarity and brevity here.  The two lists of dependencies above are 
> the two paths from the lowest common ancestor to each respective 
> conflicting package.  It also happens to be a conprehensive list of 
> *every* package I might potentially edit to fix this problem, giving me 
> the data I need to analyze the problem.  In this example, the lowest 
> common ancestor was A, the package I was working on, but you can easily 
> come up with examples where even the LCA will be some package you have 
> never heard of - but armed with that path, you can start your 
> investigation and figure out what changed, and what needs to change to 
> fix it.
> Additionally, presently, Ivy bails out as soon as it finds a single 
> dependency conflict, when there may be more than one.  This means you 
> make some decision (like "I am reverting Z to H-1.0") and fix that 
> problem, only to realize some other package (Maybe, in this example, F) 
> also depends on H-1.1.  How frustrating!
> My questions are as follows:
> 1. Is there some "tell me more" setting which will make Ivy print out 
> more info like I am asking for, or list all conflicts it can find 
> instead of dying on the first one?
> 2. If I want to write a tool to analyze dependencies, for example:
> getDownstreamDependencies(pkgName, pkgVersion)
> getUpstreamDependencies(pkgName, pkgVersion)
> getDirectDownstreamDependencies(pkgName, pkgVersion)
> Is there some library which can parse ivy.xml files which can easily be 
> used outside the ivy code base?  I haven't looked the code yet but I 
> thought I'd run it by you guys before I tried anything drastic
> 3. RFC?  (Requests for comments) - should I consider submitting a patch 
> for Ivy to do what I described above?
> Thanks!

Carl Myers
Palantir Technologies | Internal Tools Software Engineer

View raw message