[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket ead1967 111/191: Racket: fix for module eval
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket ead1967 111/191: Racket: fix for module evaluation/entering |
Date: |
Sun, 1 Aug 2021 18:32:10 -0400 (EDT) |
branch: elpa/geiser-racket
commit ead19679995fba85e987c178e3f4dde85d3059db
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Racket: fix for module evaluation/entering
Our module loader is receiving load requests for module names
represented as lists that are not exactly a submodule, in the sense
that the path does not represent an actual file.
This phenomenon happens for instance when specifying a reader in a
#lang tag. E.g.
#lang at-exp racket
will cause the loader to be called with module name '(main reader) and
path <cols-path>/at-exp/main.rkt, where main.rkt does not exist.
Afterwards, we see a call to load at-exp/lang/reader/rkt, with name
reader, which is the real code.
So, for now, i'm skipping all load requests with a list name,
forwarding them to racket's default loader.
---
geiser/enter.rkt | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/geiser/enter.rkt b/geiser/enter.rkt
index b2e233f..6da8c7a 100644
--- a/geiser/enter.rkt
+++ b/geiser/enter.rkt
@@ -39,10 +39,6 @@
(define (module-loader orig)
(enter-load/use-compiled orig #f))
-(define (notify re? path)
- (when re?
- (fprintf (current-error-port) " [re-loading ~a]\n" path)))
-
(define inhibit-eval (make-parameter #f))
(define (get-namespace mod)
@@ -85,10 +81,14 @@
(let ([cmps (explode-path path)])
(find (car cmps) (cdr cmps))))
+(define (notify re? path)
+ (when re? (fprintf (current-error-port) " [re-loading ~a]\n" path)))
+
(define ((enter-load/use-compiled orig re?) path name)
(when (inhibit-eval)
(raise (make-exn:fail "namespace not found" (current-continuation-marks))))
- (if (and name (or (not (list? name)) (car name))) ;; submodule names are
lists
+ ;; (printf "Loading ~s: ~s~%" name path)
+ (if (and name (not (list? name)))
;; Module load:
(let* ([code (get-module-code
path "compiled"
@@ -106,7 +106,6 @@
;; Not a module:
(begin (notify re? path) (orig path name))))
-
(define (get-timestamp path)
(let ([ts (file-or-directory-modify-seconds path #f (lambda () #f))])
(if ts
@@ -121,6 +120,8 @@
(values -inf.0 path)))
(values -inf.0 path)))))
+(define orig (current-load/use-compiled))
+
(define (check-latest mod)
(define mpi (module-path-index-join mod #f))
(define done (make-hash))
- [nongnu] elpa/geiser-racket dd9afbe 048/191: Racket: remote REPLs, (continued)
- [nongnu] elpa/geiser-racket dd9afbe 048/191: Racket: remote REPLs, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 8160d23 050/191: Partial work (connections working), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket f83efd0 061/191: Support for implementation-specific font lock keywords, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 2130465 065/191: Racket: showing submodules in module help, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 19e0bd6 094/191: Racket: reading into elisp-land the cache dir as needed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 4ad7d89 082/191: Racket: eval geiser-eval's apply arguments properly, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1964a0d 096/191: racket: reading into elisp-land the cache dir as needed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket dd2bbc3 090/191: Racket: fix for module compilation for recent rackets, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 51cd041 101/191: Image display functionality refactored to its own module, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket fd450c0 113/191: Racket: make sure stderr is flushed in REPL, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket ead1967 111/191: Racket: fix for module evaluation/entering,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket d986e3b 107/191: racket: correctly jump to symbols defined in .ss modules, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 46bde5a 115/191: Indentation for match-let, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 9fa09a8 129/191: Racket: fix for jump to manual for symbols not in the namespace, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 15b52ff 131/191: Fix for Racket compilation error jumping in REPL, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 85d1e6a 136/191: racket: ,gcd -> ,pwd, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket b4f158d 139/191: racket: module* and module+ denote submodules too, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket aa7ac2e 146/191: Missing require cl for case, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 95d41eb 156/191: Racket: better behaviour of geiser-eval-buffer, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 41c41e9 177/191: Delete trailing whitespace, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 8a30ded 023/191: Redisplaying the prompt after empty lines on the REPL., Philip Kaludercic, 2021/08/01