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

Remove importMetaHook #54

Closed
kriskowal opened this issue Jun 10, 2022 · 3 comments · Fixed by #67
Closed

Remove importMetaHook #54

kriskowal opened this issue Jun 10, 2022 · 3 comments · Fixed by #67

Comments

@kriskowal
Copy link
Member

@patrick-soquet notes that we can remove the complication of an importMetaHook by instead reflecting needsImportMeta on StaticModuleRecord instances. This is consistent with the property we already expect in the SyntheticStaticModuleRecord protocol. By reflecting needsImportMeta, we can move the concern to loadHook. The implementer of a loadHook is in a position to decide whether or not to elaborate the importMeta they attach to a module descriptor, based on the presence of needsImportMeta on the underlying StaticModuleRecord.

@Jack-Works
Copy link
Member

If we remove this, we'll lost the ability of doing #13

kriskowal added a commit that referenced this issue Jun 14, 2022
Fixes #54

The importMetaHook is superfluous if static module records reveal needsImportMetaHook.  The decision of whether to build out importMeta can be made in loadHook.
@kriskowal
Copy link
Member Author

@Jack-Works Per #13 (comment), I would like to for now ignore the motivating use-case for revealing the module environment record or module exports namespace on import.meta.self and proceed with #67. Any simplification will streamline this proposal. Please let me know what you think.

@Jack-Works
Copy link
Member

I think it's OK for now.

kriskowal added a commit that referenced this issue Jul 12, 2022
Fixes #54

The importMetaHook is superfluous if static module records reveal needsImportMetaHook.  The decision of whether to build out importMeta can be made in loadHook.
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

Successfully merging a pull request may close this issue.

2 participants