[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/11: packages: Prevent inlining of 'find-best-packages-by-name'.

From: guix-commits
Subject: 01/11: packages: Prevent inlining of 'find-best-packages-by-name'.
Date: Fri, 17 Jan 2020 08:25:45 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 886a76073e4654449f413831897ffde736a07c91
Author: Ludovic Court├Ęs <address@hidden>
AuthorDate: Fri Jan 17 11:19:42 2020 +0100

    packages: Prevent inlining of 'find-best-packages-by-name'.
    This allows 'tests/packages.scm' to mock it.
    * gnu/packages.scm (find-best-packages-by-name): Set! it at the top
    level to prevent it from being inline on Guile 3.
 gnu/packages.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages.scm b/gnu/packages.scm
index 143469b..d22c992 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -369,6 +369,9 @@ VERSION."
                          (string=? (package-version p) highest))
+;; Prevent Guile 3 from inlining this procedure so we can mock it in tests.
+(set! find-best-packages-by-name find-best-packages-by-name)
 (define (generate-package-cache directory)
   "Generate under DIRECTORY a cache of all the available packages.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]