ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.21k stars 142 forks source link

Can't import srfi 193 #914

Closed shawnw closed 1 year ago

shawnw commented 1 year ago

Using a freshly cloned repository:

> (import (srfi 193))
ERROR: importing unknown binding
    command-line
    (*this-module* *this-path* make-module %module-exports module-env module-env-set! module-meta-data module-meta-data-set! module-exports module-name->strings module-name->file module-name-prefix load-module-definition find-module *modules* add-module! delete-module! symbol-append symbol-drop warn to-id from-id id-filter %resolve-import auto-generate-bindings *chibi-env* *auto-env* resolve-import resolve-module-imports load-module eval-module mutable-environment environment meta-begin meta-define define-library-transformer define-library module pop-this-path include-library-declarations define-meta-primitive import import-immutable export export-all include include-ci include-shared include-shared-optionally body begin repl-import raw-script-file)

Works with the 0.10.0 release.

shawnw commented 1 year ago

Now with that commit it's giving me

ERROR: importing unknown binding
    raw-script-file
    (*this-module* *this-path* make-module %module-exports module-env module-env-set! module-meta-data module-meta-data-set! module-exports module-name->strings module-name->file module-name-prefix load-module-definition find-module *modules* add-module! delete-module! symbol-append symbol-drop warn to-id from-id id-filter %resolve-import auto-generate-bindings *chibi-env* *auto-env* resolve-import resolve-module-imports load-module eval-module mutable-environment environment meta-begin meta-define define-library-transformer define-library module pop-this-path include-library-declarations define-meta-primitive import import-immutable export export-all include include-ci include-shared include-shared-optionally body begin repl-import)

but only when trying to dump an image. I think it might be because that symbol isn't defined until after the image is dumped in main.c's run_main().

lassik commented 1 year ago

Well spotted. That seems to be the case, indeed.

@ashinn Please advise.

ghost commented 1 year ago

@shawnw I thing, github does not allow reopening issues "fixed" in pull requests, so maybe you can make a new issue?

shawnw commented 1 year ago

@shawnw I thing, github does not allow reopening issues "fixed" in pull requests, so maybe you can make a new issue?

Done; see #916