[
https://issues.apache.org/jira/browse/BUILDR-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629231#action_12629231
]
Assaf Arkin commented on BUILDR-140:
------------------------------------
In most cases all you want to do is switch to/fix the version number, you want
so say something like "xmlbeans: 2.2" and everything else happens for you.
That's why setting the VERSION number was possible, but now we have a better
approach using the build.yml file. I'm not exactly sure how to express it in
the YAML file, but that gives us a way around the setting of the VERSION
constant.
That's the simplest/elegant approach to what people want. Only when it fails
do you need to mess with the entire dependency list. That would happen, but we
want to optimize so it doesn't. REQUIRES is an array, so you can add elements,
remove elements, replace the entire contents. There's no need for
const_defined?(REQUIRES) unless REQUIRES is defined and immediately used.
XMLBeans, for example, defines REQUIRES when the code loads, but expands it
only during compilation, so you get enough opportunities during the buildfile
to change what REQUIRES points to, there's no need for the const_defined? trick.
On the other hand, Jetty is not that smart, it expands REQUIRES too early. The
issue with Jetty is letting people decide which version to use, so we only need
a way to set the version number. And we can (and should) get around the early
adding of Jetty on the classpath.
> Get rid of const_defined? all across the board
> ----------------------------------------------
>
> Key: BUILDR-140
> URL: https://issues.apache.org/jira/browse/BUILDR-140
> Project: Buildr
> Issue Type: Improvement
> Reporter: Assaf Arkin
>
> a) doesn't work with Ruby 1.9.
> b) not pretty.
> c) must be a better way.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.