-
Notifications
You must be signed in to change notification settings - Fork 824
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
Add ImportObject::get_namespace_exports #2592
Conversation
068fc1f
to
93511a2
Compare
This allows the contents of an existing namespace to be added to by extracting an `Exports` from it, adding to that `Exports` and then replacing the existing namespace with the modified `Exports`.
93511a2
to
35d6c02
Compare
fn as_exports(&self) -> Option<Exports> { | ||
None | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Option
? Also, why a default impl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backward compatibility with any existing implementations of LikeNamespace
outside wasmer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If backwards compatibility was not a concern then I would remove LikeNamespace
entirely and use Exports
directly in ImportObject
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I got the hack, but it looks good to me 👍
bors r+ |
2592: Add ImportObject::get_namespace_exports r=syrusakbary a=Amanieu This allows the contents of an existing namespace to be added to by extracting an `Exports` from it, adding to that `Exports` and then replacing the existing namespace with the modified `Exports`. Co-authored-by: Amanieu d'Antras <[email protected]>
Build failed: |
Oh, still fd_rename_path on windows x64 that fails? |
bors r+ |
2592: Add ImportObject::get_namespace_exports r=syrusakbary a=Amanieu This allows the contents of an existing namespace to be added to by extracting an `Exports` from it, adding to that `Exports` and then replacing the existing namespace with the modified `Exports`. Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
Let's try again bors r+ |
2592: Add ImportObject::get_namespace_exports r=syrusakbary a=Amanieu This allows the contents of an existing namespace to be added to by extracting an `Exports` from it, adding to that `Exports` and then replacing the existing namespace with the modified `Exports`. Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
Build failed: |
bors r+ |
2592: Add ImportObject::get_namespace_exports r=syrusakbary a=Amanieu This allows the contents of an existing namespace to be added to by extracting an `Exports` from it, adding to that `Exports` and then replacing the existing namespace with the modified `Exports`. Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
Build failed: |
bors r+ |
This allows the contents of an existing namespace to be added to by
extracting an
Exports
from it, adding to thatExports
and thenreplacing the existing namespace with the modified
Exports
.