From f4922fc904fb0e17b4e4fb52040ff745af55acae Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 27 Feb 2020 21:13:53 +0000 Subject: [PATCH] Add some syntax to prevent inlining within modules This is relevant, as it prevents the mock function used in tests working with Guile 3. --- guix-data-service/utils.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm index a748482..1eb3e4f 100644 --- a/guix-data-service/utils.scm +++ b/guix-data-service/utils.scm @@ -17,7 +17,8 @@ (define-module (guix-data-service utils) #:export (call-with-time-logging - with-time-logging)) + with-time-logging + prevent-inlining-for-tests)) (define (call-with-time-logging action thunk) (simple-format #t "debug: Starting ~A\n" action) @@ -31,3 +32,6 @@ (define-syntax-rule (with-time-logging action exp ...) "Log under NAME the time taken to evaluate EXP." (call-with-time-logging action (lambda () exp ...))) + +(define-syntax-rule (prevent-inlining-for-tests var) + (set! var var))