Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intersection semantics with ModuleSource #8

Open
caridy opened this issue Aug 19, 2022 · 0 comments
Open

Intersection semantics with ModuleSource #8

caridy opened this issue Aug 19, 2022 · 0 comments

Comments

@caridy
Copy link

caridy commented Aug 19, 2022

As part of the modules harmony effort, we are planning to introduce a new constructor, ModuleSource, than when instantiated, parses the code, and store a Module Source Record, which can be use a later time to construct a qualifying Module Record that can participate on the module graph. This poses some challenges with respect to this proposed brand check.

Instances of SourceModule are powerless, they can only be used for a) inspecting certain aspect of the source (e.g., its exported names, etc.) and b) used to create a Module instance.

The real question is whether the host check is intended to prevent parsing, or just evaluation? At the moment, both options are analogous because they both happen one after the other. But once we have a separation between parsing and evaluation, for the Modules, this question has to be answered. IMO, parsing does not have to be prohibit, but evaluation.

How can we accommodate such feature with this proposal?

cc @kriskowal @Jack-Works @nicolo-ribaudo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant