| 00:26 | <bradleymeck> | devsnek: it seems it is currently only possible with cycles in cyclic module record where an error comes from tying to initialize the env of the cyclic submodule https://tc39.es/ecma262/#cyclic-module-record |
| 00:27 | <bradleymeck> | so i dont think you can do it purely off JS |
| 00:28 | <devsnek> | interesting... |
| 00:31 | <devsnek> | bradleymeck: that's only if an impl explicitly tried to get the binding at that point though so |
| 00:31 | <devsnek> | seems unlikely |
| 00:32 | <bradleymeck> | it seems possible if 2 modules formed a export cycle |
| 00:34 | <bradleymeck> | a exports a, a exports * from b; b exports b, b exports * from a |
| 00:34 | <bradleymeck> | so i'd imagine an impl generating a binding for 1 of them before the 2nd one blows up |
| 00:38 | <devsnek> | bradleymeck: but the exception is thrown at evaluation, after the environments exist |
| 00:39 | <bradleymeck> | yea, but the environment stays null |
| 00:39 | <bradleymeck> | undefined* |
| 00:39 | <devsnek> | oh I see what you mean |
| 00:39 | <devsnek> | makes sense |
| 14:20 | <ljharb> | bradleymeck: devsnek should that then perhaps be an assert instead of a runtime exception, since it's something a host is expected to not do? |
| 14:21 | <bradleymeck> | unclear, host may never have an environment record for that module idk what the host would do then |
| 14:21 | <bradleymeck> | like if a module requires evaluation to form itself (wasm has a concept of eval during initialization) |
| 14:22 | <bradleymeck> | i think it is fine as is |
| 14:22 | <ljharb> | ok |
| 15:34 | <bradleymeck> | node's primordials namespace and snapshot stuff is a trove of edge cases in APIs |