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 Carlton Brown <cb...@silverpop.com> on 2009/09/03 17:28:32 UTC

How should latest-strategies aggregate revisions in a chain?

The subject says it all..  I am trying to find out how latest-strategies
in a chain interact are supposed to interact with one another.

 

For example, if I have 2 filesystem resolvers that specify
latest-revision, and they are grouped into a chain that specifies
latest-time, what should happen?   Should each resolver return its
latest revision, and then the chain selects the latest-time between
these two?   Or does the chain override latest-time for each resolver?

 

I am getting different results when trying this with a changingPattern
resolver... I get race condition behavior if I specify latest-time on
the chain resolver and both subresolvers.   If I specify latest-time on
the chain only, it doesn't evaluate latest-time, it just uses whatever
is already in cache.

 

Any help appreciated...

Thanks,

Carlton   

 

 



***CONFIDENTIALITY NOTICE and DISCLAIMER*** 
This message and any attachment are confidential and may be
privileged or otherwise protected from disclosure and solely for
the use of the person(s) or entity to whom it is intended. If you
have received this message in error and are not the intended
recipient, please notify the sender immediately and delete this
message and any attachment from your system. If you are not the
intended recipient, be advised that any use of this message is
prohibited and may be unlawful, and you must not copy this
message or attachment or disclose the contents to any other person.

RE: How should latest-strategies aggregate revisions in a chain?

Posted by Carlton Brown <cb...@silverpop.com>.
I found something odd when digging through the code... a ChainResolver
overrides the latest-strategy of its subresolvers only if the
latest-strategy name isn't "default" or null.   

I don't understand what would be the reason behind this.   It seems
backward to me.  

Here is the offending code in ChainResolver:

    private LatestStrategy setLatestIfRequired(DependencyResolver
resolver,
            LatestStrategy latestStrategy) {
        String latestName = getLatestStrategyName(resolver);
        if (latestName != null && !"default".equals(latestName)) {
            LatestStrategy oldLatest = getLatest(resolver);
            setLatest(resolver, latestStrategy);
            return oldLatest;
        } else {
            return null;
        }
    }

> -----Original Message-----
> From: Carlton Brown [mailto:cbrown@silverpop.com]
> Sent: Thursday, September 03, 2009 11:29 AM
> To: ivy-user@ant.apache.org
> Subject: How should latest-strategies aggregate revisions in a chain?
> 
> The subject says it all..  I am trying to find out how latest-
> strategies
> in a chain interact are supposed to interact with one another.
> 
> 
> 
> For example, if I have 2 filesystem resolvers that specify
> latest-revision, and they are grouped into a chain that specifies
> latest-time, what should happen?   Should each resolver return its
> latest revision, and then the chain selects the latest-time between
> these two?   Or does the chain override latest-time for each resolver?
> 
> 
> 
> I am getting different results when trying this with a changingPattern
> resolver... I get race condition behavior if I specify latest-time on
> the chain resolver and both subresolvers.   If I specify latest-time
on
> the chain only, it doesn't evaluate latest-time, it just uses whatever
> is already in cache.
> 
> 
> 
> Any help appreciated...
> 
> Thanks,
> 
> Carlton
> 
> 
> 
> 
> 
> 
> 
> ***CONFIDENTIALITY NOTICE and DISCLAIMER***
> This message and any attachment are confidential and may be
> privileged or otherwise protected from disclosure and solely for
> the use of the person(s) or entity to whom it is intended. If you
> have received this message in error and are not the intended
> recipient, please notify the sender immediately and delete this
> message and any attachment from your system. If you are not the
> intended recipient, be advised that any use of this message is
> prohibited and may be unlawful, and you must not copy this
> message or attachment or disclose the contents to any other person.

***CONFIDENTIALITY NOTICE and DISCLAIMER*** 
This message and any attachment are confidential and may be
privileged or otherwise protected from disclosure and solely for
the use of the person(s) or entity to whom it is intended. If you
have received this message in error and are not the intended
recipient, please notify the sender immediately and delete this
message and any attachment from your system. If you are not the
intended recipient, be advised that any use of this message is
prohibited and may be unlawful, and you must not copy this
message or attachment or disclose the contents to any other person.