You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-dev@incubator.apache.org by Gilles Scokart <gs...@gmail.com> on 2007/03/27 21:19:04 UTC

Utility of the ivy variable

I'm worndering what was the intial purpose of the ivy variables?  Was
it to decouple the core from ant properties?  To allow overwrite?

I'm wondering if it still has a utility, and if the ant properties
couldn't simply be used instead?  I might be wrong, but I have the
feeling that they have been created first without any link to ant
properties and then you have added an import of the ant properties
during the configure.  Without considering the patch I send to
https://issues.apache.org/jira/browse/IVY-366 , I have the impression
that the distinction between the ivy variables and the ant properties
is not so clear.

-- 
Gilles SCOKART

Re: Utility of the ivy variable

Posted by Xavier Hanin <xa...@gmail.com>.
On 3/27/07, Gilles Scokart <gs...@gmail.com> wrote:
>
> I'm worndering what was the intial purpose of the ivy variables?  Was
> it to decouple the core from ant properties?  To allow overwrite?
>
> I'm wondering if it still has a utility, and if the ant properties
> couldn't simply be used instead?  I might be wrong, but I have the
> feeling that they have been created first without any link to ant
> properties and then you have added an import of the ant properties
> during the configure.  Without considering the patch I send to
> https://issues.apache.org/jira/browse/IVY-366 , I have the impression
> that the distinction between the ivy variables and the ant properties
> is not so clear.


You're feeling is approximately right. Ivy variables were created mainly to
decouple the core from Ant, and also because I was sometime frustrated with
the immutability of Ant properties. The problem is that I didn't saw the
implication of having variables instead of immutable properties. One major
problem is that often variable are evaluated as soon as they are found, so
you can't really be sure their current value will be used. For instance, if
you have a pattern like that: ${myvar}/example/[module].xml, myvar is
evaluated when the settings are loaded, and thus even if myvar changes
between the loading and the actual use of the pattern, the change won't be
taken into account. Yes, I often regret not having discussed the project
since its inception like other open source projects are...

Anyway, I don't really now if Ivy variables are really used as variables by
users now, so it's difficult to say if backing them with ant properties
would be ok or not (only when run from ant, I want to preserve the
decoupling, which is important for IvyDE for instance).
My feeling is that it wouldn't hurt... but it's only a feeling. The good
thing is that with your patch and the introduction of the
IvyVariableContainer interface, we have a good migration path to Ant backed
properties, so we can pretty easily test how it would work.

- Xavier

--
> Gilles SCOKART
>