emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/geiser-racket dd2bbc3 090/191: Racket: fix for module comp


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-racket dd2bbc3 090/191: Racket: fix for module compilation for recent rackets
Date: Sun, 1 Aug 2021 18:32:06 -0400 (EDT)

branch: elpa/geiser-racket
commit dd2bbc39a0c2007440e7682c08284f27aeae03b6
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Racket: fix for module compilation for recent rackets
    
    This one probably requires Racket 5.3, and incorporates some
    parameterization to the module compilation and evaluation code in
    Geiser's version of enter.rkt.  I'm mostly mirroring what the latter
    does, and i'm probably not completely understanding all corner cases,
    so the two users of Geiser should keep an eye open for possible
    breakage introduced by this patch.
---
 geiser/enter.rkt | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/geiser/enter.rkt b/geiser/enter.rkt
index cb33a55..e996527 100644
--- a/geiser/enter.rkt
+++ b/geiser/enter.rkt
@@ -85,12 +85,13 @@
                           (current-continuation-marks))))
   (if name
       ;; Module load:
-      (let ([code (get-module-code path "compiled" compile
-                                   (lambda (ext loader?)
-                                     (load-extension ext)
-                                     #f)
-                                   #:notify (lambda (chosen)
-                                              (notify re? chosen)))]
+      (let ([code (get-module-code
+                   path "compiled"
+                   (lambda (e)
+                     (parameterize ([compile-enforce-module-constants #f])
+                       (compile e)))
+                   (lambda (ext loader?) (load-extension ext) #f)
+                   #:notify (lambda (chosen) (notify re? chosen)))]
             [path (normal-case-path
                    (simplify-path
                     (path->complete-path path
@@ -107,7 +108,8 @@
                           null))])
           (add-paths! m (resolve-paths path)))
         ;; Evaluate the module:
-        (eval code))
+        (parameterize ([current-module-declare-source path])
+          (eval code)))
       ;; Not a module:
       (begin
         (notify re? path)



reply via email to

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