You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Ray Plante <rp...@ncsa.uiuc.edu> on 2011/04/22 01:37:07 UTC

order of dependencies returned by getDependencies(), artifactreport

Hi developers,

Is there an intended order that can be assumed in the array of 
dependencies that are returned by ResolveEngine.getDependencies()?

I am hoping, for example, that the artifactreport Ant Task returns the 
dependencies consistently in "directness" order; in particular, I would 
like to be able to iterate (backwards) through the list such that each 
artifact depends only on artifacts that have already been seen in the 
list.  

My few experiments so far (including with a DAG dependency structure) 
indicate that this is indeed the case; however, I haven't been able to 
find anything in the documentation that explicitly says this will be the 
case.  Perusing the code, it looks like the order that artifactreport 
provides is determined by the order provided by 
ResolveEngine.getDependencies() (yes?).  The javadoc is silent on the 
issue of order; however, code and code comments indicate care taken to 
sort and preserve an order of the results.

Can anyone comment on the intent?  

FYI, I'm looking at using Ivy to manage a stack of software that includes 
both java and non-java packages.  Some of these, for example, are 
GNU-style built via configure-make-install.  I want to be able to actually 
build the packages (via ant wrapper scripts) as dependencies, and I need 
to do this bottom-up in dependency order.  

thanks,
Ray


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: order of dependencies returned by getDependencies(), artifactreport

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Hi Ray,



Le 22 avr. 2011 à 01:37, Ray Plante a écrit :

> Hi developers,
> 
> Is there an intended order that can be assumed in the array of 
> dependencies that are returned by ResolveEngine.getDependencies()?
> 
> I am hoping, for example, that the artifactreport Ant Task returns the 
> dependencies consistently in "directness" order; in particular, I would 
> like to be able to iterate (backwards) through the list such that each 
> artifact depends only on artifacts that have already been seen in the 
> list.  
> 
> My few experiments so far (including with a DAG dependency structure) 
> indicate that this is indeed the case; however, I haven't been able to 
> find anything in the documentation that explicitly says this will be the 
> case.  Perusing the code, it looks like the order that artifactreport 
> provides is determined by the order provided by 
> ResolveEngine.getDependencies() (yes?).  The javadoc is silent on the 
> issue of order; however, code and code comments indicate care taken to 
> sort and preserve an order of the results.
> 
> Can anyone comment on the intent?

Yes, you can rely on the order which is returned by the ResolveEngine and thus by any code using it like the artifactreport Ant task. I have updated the javadoc accordingly.
http://svn.apache.org/viewvc?view=revision&revision=1097643

Nicolas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org