GNU bug report logs - #61240
improve high-res file timestamp in Automake

Previous Next

Package: automake-patches;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Thu, 2 Feb 2023 22:26:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sam James <sam <at> cmpct.info>
To: jcb62281 <at> gmail.com
Cc: 61240 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: [bug#61240] improve high-res file timestamp in Automake
Date: Sun, 5 Feb 2023 00:06:00 +0000
[Message part 1 (text/plain, inline)]

> On 5 Feb 2023, at 00:02, Jacob Bachmeyer <jcb62281 <at> gmail.com> wrote:
> 
> Paul Eggert wrote:
>> On 2023-02-03 18:27, Jacob Bachmeyer wrote:
>>> Where are you actually using a 5.10 feature?
>> 
>> Where lib/Automake/FileUtils.pm says "use Time::HiRes qw(stat);". This does not work with Perl 5.6.
> 
> Time::HiRes is (perhaps was) installable from CPAN and is definitely /not/ a 5.10 feature.  I have a Perl 5.8 with it installed, and while my memories that far back are a bit fuzzy, I seem to remember installing Time::HiRes on a Perl 5.6 installation some years ago.  Things like "our" variables, PerlIO-by-default, and the defined-or operator are Perl features (those in 5.6, 5.8, and 5.10 if I remember correctly), modules are (with rare exceptions) not Perl features.
> 
> The correct solution if you do not want to provide for the case where Time::HiRes is not available is to simply "use Time::HiRes qw(stat);" and *let* *that* *fail* if Time::HiRes is not available or cannot export stat().  Time::HiRes was on CPAN long before it was bundled with Perl, so the Perl version does /not/ tell you if it is available.  (If Automake::FileUtils is not immediately loaded, put "use Time::HiRes;" somewhere that is.  That will be enough to ensure that Time::HiRes is available.)
> 
>> For why we bumped the version to 5.10, please see:
>> 
>> https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=61901a1a14fd50c03cfb1529d091554376fef286
>> 
>>> Please do not arbitrarily bump version requirements just to bump version requirements.
>> 
>> That's not what was done here. The abovementioned URL says version requirements were bumped from 5.6 to 5.10 because the feature is not present in 5.6 (2000), is present in 5.10 (2007), and we lacked access to the museum pieces in the middle. If you are sure that a version number lower than 5.10 will do, please let us know.
> 
> This was arbitrary because Time::HiRes is not actually dependent on the Perl version in that way.  (You should also be able to get access to the museum pieces in the middle fairly easily using perlbrew.)

I think you probably mean "a mistake" rather than "arbitrary". He didn't choose it for no reason or for fun.
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.