fix relative-path handling for source locations in bytecode
Closes PR 15174
This commit is contained in:
parent
685e74a1c6
commit
6e21376473
|
@ -2204,6 +2204,29 @@
|
|||
name)])))
|
||||
(eval '(m racket/base values)))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Check marshaling and unmarshaling with relative paths
|
||||
|
||||
(let ()
|
||||
(define dir (find-system-path 'temp-dir))
|
||||
|
||||
(define x (parameterize ([current-namespace (make-base-namespace)])
|
||||
(compile (datum->syntax #f '#'x (vector (build-path dir "sub" "x.rkt")
|
||||
1
|
||||
1
|
||||
1
|
||||
1)))))
|
||||
(define-values (i o) (make-pipe))
|
||||
(parameterize ([current-write-relative-directory
|
||||
(cons (build-path dir "nested")
|
||||
dir)])
|
||||
(write x o))
|
||||
(test (build-path dir "inner" 'up "sub" "x.rkt")
|
||||
syntax-source
|
||||
(eval (parameterize ([read-accept-compiled #t]
|
||||
[current-load-relative-directory (build-path dir "inner")])
|
||||
(read i)))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -5693,7 +5693,7 @@ Scheme_Object *scheme_extract_relative_to(Scheme_Object *obj, Scheme_Object *dir
|
|||
|
||||
while (!SCHEME_NULLP(be)) {
|
||||
if (cache) {
|
||||
obj = scheme_make_pair(up_symbol, scheme_null);
|
||||
obj = scheme_make_pair(up_symbol, obj);
|
||||
} else {
|
||||
a[0] = up_symbol;
|
||||
a[1] = obj;
|
||||
|
|
Loading…
Reference in New Issue
Block a user