Hi all,
We found a problem in the way ##sys#do-the-right-thing calls assq, which
was uncovered through 0a52536b7cb6b3d5a35ecc8f4c11131041ae873a and broke
the "git" egg's build:
http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2014/01/27/yesterday-diff/log2/install/git.html
The attached patch is simple, I hope it's also correct: it only calls
assq if there really is any info, otherwise just fall through.
I'm not 100% sure whether this is the correct fix, because I don't
really understand this code. Maybe it should complain that the
extension doesn't (yet) exist, because it hasn't been installed
at that point? In that case, the check should be pulled into the
"cond" check like so:
((and (memq id ##sys#explicit-library-modules)
(##sys#extension-information id 'require-extension))
=> (lambda (info)
(let ((nr (assq 'import-only info))
(s (assq 'syntax info)))
...)))
Cheers,
Peter
--
http://www.more-magic.net
>From 586fe04ce75adbc2632bd457baf7a0e88f94f64d Mon Sep 17 00:00:00 2001
From: Peter Bex
Date: Mon, 27 Jan 2014 21:16:59 +0100
Subject: [PATCH] Fix issue building files which explicitly use units via
-uses and then (use) them
Found through the "git" egg's compilation failure.
---
eval.scm |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eval.scm b/eval.scm
index 76ca7d6..a835394 100644
--- a/eval.scm
+++ b/eval.scm
@@ -1327,8 +1327,8 @@
#t id) )
((memq id ##sys#explicit-library-modules)
(let* ((info (##sys#extension-information id 'require-extension))
- (nr (assq 'import-only info))
- (s (assq 'syntax info)))
+ (nr (and info (assq 'import-only info)))
+ (s (and info (assq 'syntax info
(values
`(##core#begin
,@(if s `((##core#require-for-syntax ',id)) '())
--
1.7.10.4
___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers