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 "Buck, Robert" <rb...@verisign.com> on 2008/03/12 18:31:06 UTC

Can Caches Be Associated with Specific Resolvers?

Hi,
 
I was looking over the details of IVY 2 Beta 2 the other day and I had
one question.
 
It looks like one can set up caches that have affinity to particular
types of files, or patterns. On the other hand, can one define a
specific cache per resolver regardless of pattern (this would seem to be
the other dimension people would consider) ?
 
Bob

Re: Can Caches Be Associated with Specific Resolvers?

Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Mar 13, 2008 at 6:48 PM, Brown, Carlton
<Ca...@compucredit.com> wrote:
> > -----Original Message-----
>  > From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
>  > Sent: Wednesday, March 12, 2008 1:56 PM
>  > To: ivy-user@ant.apache.org
>
>
> > Subject: Re: Can Caches Be Associated with Specific Resolvers?
>  >
>  > On Wed, Mar 12, 2008 at 6:52 PM, Brown, Carlton
>  > <Ca...@compucredit.com> wrote:
>  > >
>  > > > -----Original Message-----
>  > >  > From: Buck, Robert [mailto:rbuck@verisign.com]  > Sent:
>  > Wednesday,
>  > > March 12, 2008 1:31 PM  > To: ivy-user@ant.apache.org  >
>  > Subject: Can
>  > > Caches Be Associated with Specific Resolvers?
>  > >  >
>  > >  > Hi,
>  > >  >
>  > >  > I was looking over the details of IVY 2 Beta 2 the other
>  > day  > and
>  > > I had one question.
>  > >  >
>  > >  > It looks like one can set up caches that have affinity to  >
>  > > particular types of files, or patterns. On the other hand,
>  > > can one
>  > > define a specific cache per resolver regardless of  > pattern (this
>  > > would seem to be the other dimension people  > would consider) ?
>  > >
>  > >  The documentation of <resolver> doesn't say anything about
>  > a 'cache'
>  > >  attribute.  But it seems there is a set method for 'cache' on
>  > > resolver,  also I notice the documentation of <cache> says this:
>  > >  "The default cache instance will still be defined as long
>  > as at least
>  > > one dependency resolver does not declare which cache
>  > manager to use."
>  > >
>  > >  In my testing, the attribute didn't have any effect, but
>  > maybe it's
>  > > still a work in progress.
>  > Despite the bad documentation, the cache attribute should
>  > work on all resolvers. We even have a unit test for that.
>  > Could you detail what you tested and what happened?
>
>  After further testing, what I found is there was a mismatch between the
>  cache I defined and the one I referenced.   So naturally the cache did
>  not get referenced.   The interesting thing however is the invalid cache
>  reference did not cause Ivy to warn or fail, like it does when you
>  specify other invalid elements (like a resolver for example).

Indeed, this is bad. Please open an issue to ask to raise an error in
such a case.

Xavier

>
>
>
>  -----------------------------------------
>  ====================================================
>  This message contains PRIVILEGED and CONFIDENTIAL
>  information that is intended only for use by the
>  named recipient. If you are not the named recipient,
>  any disclosure, dissemination, or action based on
>  the contents of this message is prohibited. In such
>  case please notify us and destroy and delete all
>  copies of this transmission.  Thank you.
>  ====================================================
>



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

RE: Can Caches Be Associated with Specific Resolvers?

Posted by "Brown, Carlton" <Ca...@compucredit.com>.
> -----Original Message-----
> From: Xavier Hanin [mailto:xavier.hanin@gmail.com] 
> Sent: Wednesday, March 12, 2008 1:56 PM
> To: ivy-user@ant.apache.org
> Subject: Re: Can Caches Be Associated with Specific Resolvers?
> 
> On Wed, Mar 12, 2008 at 6:52 PM, Brown, Carlton 
> <Ca...@compucredit.com> wrote:
> >
> > > -----Original Message-----
> >  > From: Buck, Robert [mailto:rbuck@verisign.com]  > Sent: 
> Wednesday, 
> > March 12, 2008 1:31 PM  > To: ivy-user@ant.apache.org  > 
> Subject: Can 
> > Caches Be Associated with Specific Resolvers?
> >  >
> >  > Hi,
> >  >
> >  > I was looking over the details of IVY 2 Beta 2 the other 
> day  > and 
> > I had one question.
> >  >
> >  > It looks like one can set up caches that have affinity to  > 
> > particular types of files, or patterns. On the other hand,  
> > can one 
> > define a specific cache per resolver regardless of  > pattern (this 
> > would seem to be the other dimension people  > would consider) ?
> >
> >  The documentation of <resolver> doesn't say anything about 
> a 'cache'
> >  attribute.  But it seems there is a set method for 'cache' on 
> > resolver,  also I notice the documentation of <cache> says this:
> >  "The default cache instance will still be defined as long 
> as at least  
> > one dependency resolver does not declare which cache 
> manager to use."
> >
> >  In my testing, the attribute didn't have any effect, but 
> maybe it's  
> > still a work in progress.
> Despite the bad documentation, the cache attribute should 
> work on all resolvers. We even have a unit test for that. 
> Could you detail what you tested and what happened?

After further testing, what I found is there was a mismatch between the
cache I defined and the one I referenced.   So naturally the cache did
not get referenced.   The interesting thing however is the invalid cache
reference did not cause Ivy to warn or fail, like it does when you
specify other invalid elements (like a resolver for example).  

-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.
====================================================

Re: Can Caches Be Associated with Specific Resolvers?

Posted by Xavier Hanin <xa...@gmail.com>.
On Wed, Mar 12, 2008 at 6:52 PM, Brown, Carlton
<Ca...@compucredit.com> wrote:
>
> > -----Original Message-----
>  > From: Buck, Robert [mailto:rbuck@verisign.com]
>  > Sent: Wednesday, March 12, 2008 1:31 PM
>  > To: ivy-user@ant.apache.org
>  > Subject: Can Caches Be Associated with Specific Resolvers?
>  >
>  > Hi,
>  >
>  > I was looking over the details of IVY 2 Beta 2 the other day
>  > and I had one question.
>  >
>  > It looks like one can set up caches that have affinity to
>  > particular types of files, or patterns. On the other hand,
>  > can one define a specific cache per resolver regardless of
>  > pattern (this would seem to be the other dimension people
>  > would consider) ?
>
>  The documentation of <resolver> doesn't say anything about a 'cache'
>  attribute.  But it seems there is a set method for 'cache' on resolver,
>  also I notice the documentation of <cache> says this:
>  "The default cache instance will still be defined as long as at least
>  one dependency resolver does not declare which cache manager to use."
>
>  In my testing, the attribute didn't have any effect, but maybe it's
>  still a work in progress.
Despite the bad documentation, the cache attribute should work on all
resolvers. We even have a unit test for that. Could you detail what
you tested and what happened?

Xavier

>
>
>
>  -----------------------------------------
>  ====================================================
>  This message contains PRIVILEGED and CONFIDENTIAL
>  information that is intended only for use by the
>  named recipient. If you are not the named recipient,
>  any disclosure, dissemination, or action based on
>  the contents of this message is prohibited. In such
>  case please notify us and destroy and delete all
>  copies of this transmission.  Thank you.
>  ====================================================
>



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

RE: Can Caches Be Associated with Specific Resolvers?

Posted by "Brown, Carlton" <Ca...@compucredit.com>.
> -----Original Message-----
> From: Buck, Robert [mailto:rbuck@verisign.com] 
> Sent: Wednesday, March 12, 2008 1:31 PM
> To: ivy-user@ant.apache.org
> Subject: Can Caches Be Associated with Specific Resolvers?
> 
> Hi,
>  
> I was looking over the details of IVY 2 Beta 2 the other day 
> and I had one question.
>  
> It looks like one can set up caches that have affinity to 
> particular types of files, or patterns. On the other hand, 
> can one define a specific cache per resolver regardless of 
> pattern (this would seem to be the other dimension people 
> would consider) ?

The documentation of <resolver> doesn't say anything about a 'cache'
attribute.  But it seems there is a set method for 'cache' on resolver,
also I notice the documentation of <cache> says this:
"The default cache instance will still be defined as long as at least
one dependency resolver does not declare which cache manager to use."

In my testing, the attribute didn't have any effect, but maybe it's
still a work in progress.



-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.
====================================================

Re: Can Caches Be Associated with Specific Resolvers?

Posted by Xavier Hanin <xa...@gmail.com>.
On Wed, Mar 12, 2008 at 7:04 PM, Buck, Robert <rb...@verisign.com> wrote:
>
>  Woohoo! That's Fantastic Xavier.
Glad to ear you love it :-)
> I am looking forward to cleaning up the
>  workarounds I put in place.
>
>  I will provide any feedback as I work through trying this.
Great! Beta is here for that: feedback before changes go final.

Xavier

>
>  Thanks so much.
>
>  Bob
>
>
>  -----Original Message-----
>  From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
>  Sent: Wednesday, March 12, 2008 1:50 PM
>  To: ivy-user@ant.apache.org
>
>
> Subject: Re: Can Caches Be Associated with Specific Resolvers?
>
>  On Wed, Mar 12, 2008 at 6:31 PM, Buck, Robert <rb...@verisign.com>
>  wrote:
>  > Hi,
>  >
>  >  I was looking over the details of IVY 2 Beta 2 the other day and I
>  > had  one question.
>  >
>  >  It looks like one can set up caches that have affinity to particular
>
>  > types of files, or patterns. On the other hand, can one define a
>  > specific cache per resolver regardless of pattern (this would seem to
>  > be  the other dimension people would consider) ?
>  Actually, the former is not possible (pattern affinity) but the latter
>  is... it seems we "just" forgot to update the documentation on the
>  resolvers page: with beta 2 all resolvers have a cache attribute, which
>  allow to give the name of the cache instance to associate with the
>  resolver. With pluggable caches, it's a great improvement to Ivy
>  flexibility!
>
>  Xavier
>
>  >
>  >  Bob
>  >
>
>
>
>  --
>  Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/
>  http://ant.apache.org/ivy/ http://www.xoocode.org/
>



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

RE: Can Caches Be Associated with Specific Resolvers?

Posted by "Buck, Robert" <rb...@verisign.com>.
Woohoo! That's Fantastic Xavier. I am looking forward to cleaning up the
workarounds I put in place.

I will provide any feedback as I work through trying this.

Thanks so much. 

Bob

-----Original Message-----
From: Xavier Hanin [mailto:xavier.hanin@gmail.com] 
Sent: Wednesday, March 12, 2008 1:50 PM
To: ivy-user@ant.apache.org
Subject: Re: Can Caches Be Associated with Specific Resolvers?

On Wed, Mar 12, 2008 at 6:31 PM, Buck, Robert <rb...@verisign.com>
wrote:
> Hi,
>
>  I was looking over the details of IVY 2 Beta 2 the other day and I 
> had  one question.
>
>  It looks like one can set up caches that have affinity to particular

> types of files, or patterns. On the other hand, can one define a  
> specific cache per resolver regardless of pattern (this would seem to 
> be  the other dimension people would consider) ?
Actually, the former is not possible (pattern affinity) but the latter
is... it seems we "just" forgot to update the documentation on the
resolvers page: with beta 2 all resolvers have a cache attribute, which
allow to give the name of the cache instance to associate with the
resolver. With pluggable caches, it's a great improvement to Ivy
flexibility!

Xavier

>
>  Bob
>



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

Re: Can Caches Be Associated with Specific Resolvers?

Posted by Xavier Hanin <xa...@gmail.com>.
On Wed, Mar 12, 2008 at 6:31 PM, Buck, Robert <rb...@verisign.com> wrote:
> Hi,
>
>  I was looking over the details of IVY 2 Beta 2 the other day and I had
>  one question.
>
>  It looks like one can set up caches that have affinity to particular
>  types of files, or patterns. On the other hand, can one define a
>  specific cache per resolver regardless of pattern (this would seem to be
>  the other dimension people would consider) ?
Actually, the former is not possible (pattern affinity) but the latter
is... it seems we "just" forgot to update the documentation on the
resolvers page: with beta 2 all resolvers have a cache attribute,
which allow to give the name of the cache instance to associate with
the resolver. With pluggable caches, it's a great improvement to Ivy
flexibility!

Xavier

>
>  Bob
>



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