Skip to content

DRAFT / WIP: Feature/support esm - #103

Draft
stroiman wants to merge 31 commits into
tommie:masterfrom
stroiman:feature/support-esm
Draft

DRAFT / WIP: Feature/support esm#103
stroiman wants to merge 31 commits into
tommie:masterfrom
stroiman:feature/support-esm

Conversation

@stroiman

@stroiman stroiman commented May 9, 2025

Copy link
Copy Markdown

This is far from ready to merge, I merely make this as a draft so you can check out the state of the code.

Module caching needs to be understood, I can only assume an infinite recursion would happen with cyclic deps right now.

I would also as a minimum understand how dynamic imports work, even if they might not be supported at first. Just to make sure that it can be added later without requiring a breaking change.

I'll use it in an experimental branch of https://github.com/gost-dom/browser so it has been tested in a larger context before removing "draft" status.

Comment thread isolate-macros.h
#define ISOLATE_SCOPE(iso) \
Locker locker(iso); \
Isolate::Scope isolate_scope(iso); \
HandleScope handle_scope(iso);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the namespace explicit, so #includeing this file doesn't require the source file to use a namespace.

@stroiman

stroiman commented May 9, 2025

Copy link
Copy Markdown
Author

I see my errors.Join once again fails the build because it's not in the minimum supported go version.

But looking at existing test test code, I see to a large part it ignores errors. And I guess that should be fine - if a v8go call returns an error, the actual test/comparison would most probably fail anyway, assuming it's not comparing with zero-values. Thought's on this?

@stroiman
stroiman force-pushed the feature/support-esm branch from 608b721 to b32069b Compare May 12, 2025 04:45
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 this pull request may close these issues.

1 participant