-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
module: pass v8::Object to linked module initialization function #4771
Conversation
|
||
if (exports_v->IsObject()) | ||
return args.GetReturnValue().Set(exports_v.As<Object>()); | ||
|
||
node::Utf8Value module_v(env->isolate(), module); | ||
node::Utf8Value module_v(env->isolate(), module_name); |
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.
I wonder if it should be module_name_v
instead.
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.
fixed
One nit, otherwise LGTM. Tagged as semver-major, because it will break ABI compatibility with previous versions. |
But in the issue #4756 @bnoordhuis said:
It looks like the contradiction. If we decide to mark it as the compatibility break, then i intend to add the commit removing the underscore from |
@kaero I'm +1 on making this public. Since we have a conflict here, I guess it needs @nodejs/ctc resolution. |
@indutny any additional actions are required from me? I'm not familiar with the conflict resolution process in the node :\ |
I'm not so sure there is a conflict, I'm not reading a definitive statement from @bnoordhuis there. I'm +1 on the change, i.e. lgtm, the symertry with addon loading is nice. However, on that topic, the only reason we do I'm also +1 on this being semver-major, this API is in use, as evidenced by this PR obviously. Breaking both API and ABI, even for a "private" (because leading-underscore) is not cool. @bnoordhuis do you want to clarify your position on the semver nature of this? /cc @thlorenz |
@kaero leave it with us for now I think, we'll get it resolved and let you know if there's anything you need. If you want to argue for a particular position on semver-major vs minor vs patch then you're welcome to contribute to the discussion, we expect people to champion their positions if they feel strongly one way or another. |
Semver-major seems right to me. The current behavior is unintentional but better to hold off until the next major version on the off chance that someone relies on it. |
LGTM BTW |
HONESTLY SAYING, LGTM TOO |
Ok, so, i think to move the discussion about publicity of |
Local<Object> exports = Object::New(env->isolate()); | ||
Local<String> exports_prop = String::NewFromUtf8(env->isolate(), "exports"); | ||
module->Set(exports_prop, exports); |
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.
Should exports_prop
be placed on Environment like other strings?
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.
I'd say no. It's normally unused.
Is there any stoppers to merge this PR? :3 |
Let's run the CI one more time, the last one had a Windows buildbot acting up. https://ci.nodejs.org/job/node-test-pull-request/1370/ |
As i had saw before Jenkins was closed by authorization, CI is ok. Can changes be merged? |
CI is green. Will land :-) |
Fixes: #4756 PR-URL: #4771 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Landed in 71470a8 |
Fixes: nodejs#4756 PR-URL: nodejs#4771 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Fixes: #4756