GNU bug report logs - #26163
time-difference doesn't detect error of differing time types

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Sat, 18 Mar 2017 22:24:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26163 in the body.
You can then email your comments to 26163 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#26163; Package guile. (Sat, 18 Mar 2017 22:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zefram <zefram <at> fysh.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 18 Mar 2017 22:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: bug-guile <at> gnu.org
Subject: time-difference doesn't detect error of differing time types
Date: Sat, 18 Mar 2017 22:23:36 +0000
scheme@(guile-user)> (use-modules (srfi srfi-19))
scheme@(guile-user)> (time-difference (make-time time-tai 0 1) (make-time time-utc 0 1))
$1 = #<time type: time-duration nanosecond: 0 second: 0>

SRFI-19 is explicit that it "is an error" if the arguments to
time-difference are of different time types, and correspondingly the
Guile documentation says the arguments "must be" of the same type.
It would be very easy for time-difference to detect and signal this error.
It's not absolutely a bug that it currently doesn't, but it would be a
useful improvement if it did.

-zefram




Information forwarded to bug-guile <at> gnu.org:
bug#26163; Package guile. (Wed, 19 Apr 2017 18:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 26163 <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: 26163 <at> debbugs.gnu.org
Subject: Re: bug#26163: time-difference doesn't detect error of differing
 time types
Date: Wed, 19 Apr 2017 19:12:08 +0100
[Message part 1 (text/plain, inline)]
Patch attached.

-zefram
[0001-signal-error-of-time-difference-on-differing-types.patch (text/x-diff, attachment)]

Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Sun, 21 Oct 2018 23:46:01 GMT) Full text and rfc822 format available.

Notification sent to Zefram <zefram <at> fysh.org>:
bug acknowledged by developer. (Sun, 21 Oct 2018 23:46:02 GMT) Full text and rfc822 format available.

Message #13 received at 26163-done <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Zefram <zefram <at> fysh.org>
Cc: 26163-done <at> debbugs.gnu.org
Subject: Re: bug#26163: time-difference doesn't detect error of differing time
 types
Date: Sun, 21 Oct 2018 19:45:14 -0400
Zefram <zefram <at> fysh.org> writes:

> scheme@(guile-user)> (use-modules (srfi srfi-19))
> scheme@(guile-user)> (time-difference (make-time time-tai 0 1) (make-time time-utc 0 1))
> $1 = #<time type: time-duration nanosecond: 0 second: 0>
>
> SRFI-19 is explicit that it "is an error" if the arguments to
> time-difference are of different time types, and correspondingly the
> Guile documentation says the arguments "must be" of the same type.
> It would be very easy for time-difference to detect and signal this error.
> It's not absolutely a bug that it currently doesn't, but it would be a
> useful improvement if it did.

Agreed.  Fixed in commit c9d903b6e4f8cc1d8382b20a2f0502c4ce8ffe0a on the
stable-2.2 branch.  I'm closing this bug, but feel free to reopen if
appropriate.

     Thanks!
       Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Nov 2018 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 152 days ago.

Previous Next


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