04:15 | <snek> | interesting that someone noticed... https://github.com/denoland/deno/issues/25275. i think it's only incidental that it works in nodejs because node happened to implement module loading in js where promise hooks preserved the context. |
05:42 | <Justin Ridgewell> | We’ve discussed this before, and I think we decided that module evaluation always happens in a clean context? |
05:42 | <Justin Ridgewell> | Ie, Deno’s behavior now is correct, and this is an intentional difference from ALS. |
05:49 | <snek> | the PR currently leaves it to be host defined. but either way noticing how people react to things is always useful i think. |
11:36 | <Andreu Botella> | the PR currently leaves it to be host defined. but either way noticing how people react to things is always useful i think. |
11:37 | <Andreu Botella> | nicolo-ribaudo argues that since module evaluation is idempotent, it should not depend on ambient state (whenever possible) |
12:17 | <Luca Casonato> | yeah, we discussed this at module harmony a couple weeks ago |
13:43 | <Chengzhong Wu> | #98 leaves it to be host defined because the "clean context" can contain host defined initial entries. However, this does allow host to propogate the context of very first call to import() or import.defer().exported . Maybe an editor's note can clarify that "it is recommended to not propagate the context"? |
13:45 | <nicolo-ribaudo> | We should normatively enforce the behavior we want |
13:46 | <nicolo-ribaudo> | Module and script records could snapshot the context where they run, and run module.Evaluate() in dynamic import using that context |