Remove workaround for 'time-monotonic' in Guile 2.2.2.
This is a followup to e688c2df39
.
* build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
This commit is contained in:
parent
99b23eabdb
commit
9acacb71c9
|
@ -42,13 +42,6 @@
|
||||||
(beautify-user-module! m)
|
(beautify-user-module! m)
|
||||||
m))
|
m))
|
||||||
|
|
||||||
(cond-expand
|
|
||||||
(guile-2.2
|
|
||||||
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
|
|
||||||
;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
|
|
||||||
(define time-monotonic time-tai))
|
|
||||||
(else #t))
|
|
||||||
|
|
||||||
(define (call-with-time thunk kont)
|
(define (call-with-time thunk kont)
|
||||||
"Call THUNK and pass KONT the elapsed time followed by THUNK's return
|
"Call THUNK and pass KONT the elapsed time followed by THUNK's return
|
||||||
values."
|
values."
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -33,13 +33,6 @@
|
||||||
;;;
|
;;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(cond-expand
|
|
||||||
(guile-2.2
|
|
||||||
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
|
|
||||||
;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
|
|
||||||
(define time-monotonic time-tai))
|
|
||||||
(else #t))
|
|
||||||
|
|
||||||
(define (obsolete? date now ttl)
|
(define (obsolete? date now ttl)
|
||||||
"Return #t if DATE is obsolete compared to NOW + TTL seconds."
|
"Return #t if DATE is obsolete compared to NOW + TTL seconds."
|
||||||
(time>? (subtract-duration now (make-time time-duration 0 ttl))
|
(time>? (subtract-duration now (make-time time-duration 0 ttl))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017 Sou Bunnbu <iyzsong@gmail.com>
|
;;; Copyright © 2017 Sou Bunnbu <iyzsong@gmail.com>
|
||||||
;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
|
;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
|
||||||
;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -96,13 +96,6 @@ stopped."
|
||||||
;;; File download progress report.
|
;;; File download progress report.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(cond-expand
|
|
||||||
(guile-2.2
|
|
||||||
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
|
|
||||||
;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
|
|
||||||
(define time-monotonic time-tai))
|
|
||||||
(else #t))
|
|
||||||
|
|
||||||
(define (nearest-exact-integer x)
|
(define (nearest-exact-integer x)
|
||||||
"Given a real number X, return the nearest exact integer, with ties going to
|
"Given a real number X, return the nearest exact integer, with ties going to
|
||||||
the nearest exact even integer."
|
the nearest exact even integer."
|
||||||
|
|
|
@ -102,13 +102,6 @@
|
||||||
;;;
|
;;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(cond-expand
|
|
||||||
(guile-2.2
|
|
||||||
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
|
|
||||||
;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
|
|
||||||
(define time-monotonic time-tai))
|
|
||||||
(else #t))
|
|
||||||
|
|
||||||
(define %narinfo-cache-directory
|
(define %narinfo-cache-directory
|
||||||
;; A local cache of narinfos, to avoid going to the network. Most of the
|
;; A local cache of narinfos, to avoid going to the network. Most of the
|
||||||
;; time, 'guix substitute' is called by guix-daemon as root and stores its
|
;; time, 'guix substitute' is called by guix-daemon as root and stores its
|
||||||
|
|
|
@ -106,13 +106,6 @@ scope."
|
||||||
'()
|
'()
|
||||||
packages)))))
|
packages)))))
|
||||||
|
|
||||||
(cond-expand
|
|
||||||
(guile-2.2
|
|
||||||
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
|
|
||||||
;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
|
|
||||||
(define time-monotonic time-tai))
|
|
||||||
(else #t))
|
|
||||||
|
|
||||||
(define (call-with-time thunk kont)
|
(define (call-with-time thunk kont)
|
||||||
"Call THUNK and pass KONT the elapsed time followed by THUNK's return
|
"Call THUNK and pass KONT the elapsed time followed by THUNK's return
|
||||||
values."
|
values."
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2017, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -24,13 +24,6 @@
|
||||||
#:use-module ((guix utils) #:select (call-with-temporary-directory))
|
#:use-module ((guix utils) #:select (call-with-temporary-directory))
|
||||||
#:use-module (ice-9 match))
|
#:use-module (ice-9 match))
|
||||||
|
|
||||||
(cond-expand
|
|
||||||
(guile-2.2
|
|
||||||
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
|
|
||||||
;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
|
|
||||||
(define time-monotonic time-tai))
|
|
||||||
(else #t))
|
|
||||||
|
|
||||||
(test-begin "cache")
|
(test-begin "cache")
|
||||||
|
|
||||||
(test-equal "remove-expired-cache-entries"
|
(test-equal "remove-expired-cache-entries"
|
||||||
|
|
Loading…
Reference in New Issue