Hi Erica,

require-extension and require-library are only equivalent when import
libraries ("import.scm" files) are available for the given name, which
isn't the case in your interpreted example.

When main_a.scm starts, it implicitly tries to import module "extra" as
a first step, and no such module is available (since "extra.scm" has not
been evaluated yet and there is no file "extra.import.scm" to load).

When main_b.scm starts, it firstly evaluates "extra.scm" (thereby
registering module "extra") and _then_ imports module "extra", which
works since the module is known to the runtime.

That doesn't really help achieve your goal of making the compiled and
interpreted cases works the same, I know, but it hopefully helps to
explain the difference in behaviour between those files.

Cheers,

Evan

Reply via email to