lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David E. Wheeler" <da...@justatheory.com>
Subject Re: [lucy-dev] Failed: PAUSE indexer report KARMAN/Lucy-0.3.0.tar.gz
Date Thu, 01 Mar 2012 18:37:41 GMT
On Feb 29, 2012, at 6:21 PM, Marvin Humphrey wrote:

> It turns out that this technique has significant drawbacks.
> 
> The main problem is that it's not safe to "require Lucy" or "use Lucy" before
> the XS extension is built, so the routine in Module::Build::ModuleInfo which
> extracts version numbers can't be run on Lucy before the build finishes.

A few things:

* Why are you reading a version before it’s built? Lucy.pm does not have to load itself.
* Why are you reading the version at all? If that's a subclass of Module::Build, you can just
use  $self->dist_version
* Module::Build::ModuleInfo is deprecated; use Module::Metadata instead.

> With this commit, I was able to made the immediate problem go away for some
> systems, e.g. the FreeBSD buildbot running Perl 5.12.4 and my local copy of
> Perl 5.10...
> 
>    http://svn.apache.org/viewvc?view=revision&revision=1294825
> 
> ... but other systems are still broken, e.g. my local copy of Perl 5.14.1.

That should not be necessary at all.

> It is hard to guarantee that that ModuleInfo code will not be run too soon, as
> it seems that Module::Build assumes it will always be safe.

It should be. Lucy.pm should not `require Lucy`. It is choking on reading the version from
Lucy.pm, yes?

> Therefore, I think that if we are going to specify per-Perl-package version
> numbers, we have to go with explicit numbers.  (My personal preference is to
> just require Module::Build 0.38 or above during "./Build dist", though.)

You can do that, and I recommend it. But there are some other issues this has highlighted
that I think ought to be addressed.

Best,

David


Mime
View raw message