mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-05 19:50:23 +02:00
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: GUILE-VERSION test-suite/tests/srfi-4.test
This commit is contained in:
commit
ab4bc85398
73 changed files with 1292 additions and 335 deletions
|
@ -3414,6 +3414,15 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
'(#:warnings (unbound-variable arity-mismatch format)))
|
||||
|
||||
(define* (load-in-vicinity dir path #:optional reader)
|
||||
(define (canonical->suffix canon)
|
||||
(cond
|
||||
((string-prefix? "/" canon) canon)
|
||||
((and (> (string-length canon) 2)
|
||||
(eqv? (string-ref canon 1) #\:))
|
||||
;; Paths like C:... transform to /C...
|
||||
(string-append "/" (substring canon 0 1) (substring canon 2)))
|
||||
(else canon)))
|
||||
|
||||
;; Returns the .go file corresponding to `name'. Does not search load
|
||||
;; paths, only the fallback path. If the .go file is missing or out of
|
||||
;; date, and auto-compilation is enabled, will try auto-compilation, just
|
||||
|
@ -3425,11 +3434,12 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
;; partially duplicates functionality from (system base compile).
|
||||
;;
|
||||
(define (compiled-file-name canon-path)
|
||||
;; FIXME: would probably be better just to append SHA1(canon-path)
|
||||
;; to the %compile-fallback-path, to avoid deep directory stats.
|
||||
(and %compile-fallback-path
|
||||
(string-append
|
||||
%compile-fallback-path
|
||||
;; no need for '/' separator here, canon-path is absolute
|
||||
canon-path
|
||||
(canonical->suffix canon-path)
|
||||
(cond ((or (null? %load-compiled-extensions)
|
||||
(string-null? (car %load-compiled-extensions)))
|
||||
(warn "invalid %load-compiled-extensions"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue