Fellow Chickeneers,

thanks to Felix mentioning it yesterday, I checked out the inline egg
today. I think it's really neat, I recommend you to check it out, too,
if you didn't, yet. I only noticed two things:

1. It dumps compilation results in ~/.cache by default. This, however,
   is a bit like dumping stuff in /usr/share so I think it would be
   better to make this ~/.cache/chicken-inline or something.

2. It does a redundant check for existence of the cache directory
   (remember the create-directory discussion a few days back) and
   doesn't create missing parent directories.

This patch changes / fixes these things. Felix, feel free to apply or
ignore it if you think it's silly :-)

Thanks
Moritz
Index: inline.scm
===================================================================
--- inline.scm  (revision 28291)
+++ inline.scm  (working copy)
@@ -39,7 +39,7 @@
 (define (inline-eval x . o)
   (inline-compile x (if (pair? o) (car o) "") #t))
 
-(define-constant default-inline-cache-name ".cache")
+(define-constant default-inline-cache-name ".cache/chicken-inline")
 
 (define windows-shell (foreign-value "C_WINDOWS_SHELL" bool))
 (define inline-cache (make-parameter default-inline-cache-name))
@@ -94,7 +94,6 @@
           (zero? (system (sprintf "cmp -s ~A ~A" (qs a) (qs b)))) )))
 
 (define (ensure-cache)
-  (unless (file-exists? (inline-cache))
-    (create-directory (inline-cache)) ) )
+  (create-directory (inline-cache) #t) )
 
 )
_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to