mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
fix order of importing modules and resolving duplicates handlers
* module/ice-9/boot-9.scm (define-module*): Resolve duplicates handlers only after importing modules. Fixes a bug in which a module with #:use-module (oop goops) but whose merge-generics handler got resolved to noop instead of the real merge-generics handler. I can't think of an easy way to test this, though. Thanks to David Pirotte for the report!
This commit is contained in:
parent
fb031aba42
commit
6b1c5d9d67
1 changed files with 6 additions and 5 deletions
|
@ -2656,10 +2656,6 @@ VALUE."
|
|||
(error "expected list of integers for version"))
|
||||
(set-module-version! module version)
|
||||
(set-module-version! (module-public-interface module) version)))
|
||||
(if (pair? duplicates)
|
||||
(let ((handlers (lookup-duplicates-handlers duplicates)))
|
||||
(set-module-duplicates-handlers! module handlers)))
|
||||
|
||||
(let ((imports (resolve-imports imports)))
|
||||
(call-with-deferred-observers
|
||||
(lambda ()
|
||||
|
@ -2679,7 +2675,12 @@ VALUE."
|
|||
(error "expected re-exports to be a list of symbols or symbol pairs"))
|
||||
;; FIXME
|
||||
(if (not (null? autoloads))
|
||||
(apply module-autoload! module autoloads)))))
|
||||
(apply module-autoload! module autoloads))
|
||||
;; Wait until modules have been loaded to resolve duplicates
|
||||
;; handlers.
|
||||
(if (pair? duplicates)
|
||||
(let ((handlers (lookup-duplicates-handlers duplicates)))
|
||||
(set-module-duplicates-handlers! module handlers))))))
|
||||
|
||||
(if transformer
|
||||
(if (and (pair? transformer) (list-of symbol? transformer))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue