On Thu, Oct 13, 2005 at 04:06:17PM +0900, Gavin Sinclair wrote:
> On 10/13/05, Mauricio Fern?ndez <mfp / acm.org> wrote:
> >
> > The inclusion of Package.rb in RubyGems would benefit:
> >
> > [snip]
> >
> > Repackagers:
> > * unified repackager-friendly format for all sw. written in Ruby
> > * ability to automate partially the packaging process thanks to a predictable
> >   structure and consistent standards
> >
> > RubyGems developers
> > * interaction with repackagers done through Package.rb, which has been
> >   designed and implemented based on the feedback from experienced repackagers
> > * less work ;-) much of the TODO
> 
> Didn't you say the repackaging problems concerning RubyGems were about
> content, not format?

The most annoying problems are those that require patches to the source code.
There are other comparatively minor annoyances Package would also help to avoid.

We can promote good practices that help repackagers and end users from within
RubyGems. RubyGems' packaging process can guide the upstream developer so the
software he writes works both with and without RubyGems. Package would play
that role.

> For example, if I put the following code in a library file:
> 
>   require_gem 'gmailer', '> 0.1.0'
> 
> and then package it as a gem, will repackagers complain?  

The major problem with require_gem was its non-declarative nature due to
autorequire. Once the latter goes (as decided by the RubyGems team IIRC) and
require_gem is renamed to use_gem, it will be possible to turn it into a
non-op so that the dependency on RubyGems is removed.

> Does the answer to that question depend on whether I used Packager.rb in the
> process?

Package would provide (part of) the functionality implied by gem lint:
several sanity checks could prove useful for non-RubyGems releases too.
In this specific case, Package could scan the sources and issue a warning on
suspect uses of require_gem (even now, an unqualified require_gem is very
suspicious).

> I'm all for Packager.rb being an excellent piece of software and
> RubyGems using it if appropriate, but I wonder if it really solves all
> the problems.

Package.rb is not a silver bullet. But it does address several problems
exacerbated by RubyGems in a way that benefits those who choose RubyGems to
install (and run) Ruby software and those who don't.

-- 
Mauricio Fernandez