Issue #412 - Support cond-expand when importing deps

This commit is contained in:
Justin Ethier 2021-01-03 23:09:16 -05:00
parent 5a86b70a7b
commit c18ca25ad9
2 changed files with 11 additions and 6 deletions

View file

@ -3,6 +3,10 @@
## 0.25 - TBD
TODO: consider creating a revised overview of our GC that unifies the original writeup, lazy sweeping, and these latest changes for safely sharing objects between threads.
Bug Fixes
- Fix import of library dependencies from the interpreter, when the dependencies are imported via `cond-expand`.
## 0.24 - TBD
Bug Fixes

View file

@ -747,12 +747,12 @@
(define (base-expander)
(let ((rename-env (env:extend-environment '() '() '()))
;(macros (filter
; (lambda (v)
; (Cyc-macro? (Cyc-get-cvar (cdr v))))
; (Cyc-global-vars)))
(macros (filter
(lambda (v)
(Cyc-macro? (Cyc-get-cvar (cdr v))))
(Cyc-global-vars)))
)
;(macro:load-env! macros (create-environment '() '()))
(macro:load-env! macros (create-environment '() '()))
(lambda (ex)
(expand ex (macro:get-env) rename-env))))
@ -766,11 +766,12 @@
(explicit-lib-names
(map lib:import->library-name (lib:list->import-set import-sets)))
;; All dependent libraries
(lib-names (lib:get-all-import-deps import-sets *append-dirs* *prepend-dirs* base-expander))
(lib-names (lib:get-all-import-deps import-sets *append-dirs* *prepend-dirs* (base-expander)))
(renamed-syms (filter pair?
(map car
(lib:imports->idb import-sets *append-dirs* *prepend-dirs* base-expander))))
)
(for-each
(lambda (lib-name)
(let* ((us (lib:name->unique-string lib-name))