-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat!(NODE-3472): convert to Node-API #137
Conversation
Address the TODOs asking for the state to be managed through smart pointers and as a proper class with destructors. This is helpful for the upcoming Node-API conversion, because the presence of C++ exceptions in Node-API (and the fact that Node-API support also comes with multithreading support) makes it important to use proper C++ RAII style in order to avoid memory leaks.
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.
LGTM! Thanks again for this 🚀
Looks great, thanks for doing this! |
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.
LGTM, I think my last two questions are just about whether we should make some NODE tickets for future work
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 think these changes are fine to go in as they are; two notes for completeness:
- I don't have any strong opinions on the empty options/string question, I think the justification for the behavior makes sense, so apart from better documentation I don't think there is anything for us to do.
- I'd like us to consider how we can accelerate the conversion to a promise-only API; the major release presents us with an opportunity to make that sort of a breaking change, but we can discuss that separately and it need not hold up these changes
mongosh integration patch: https://spruce.mongodb.com/version/614b2cf5e3c331087eee218b/tasks
chore: address TODO for managing state through smart pointers
Address the TODOs asking for the state to be managed through
smart pointers and as a proper class with destructors.
This is helpful for the upcoming Node-API conversion, because
the presence of C++ exceptions in Node-API (and the fact that
Node-API support also comes with multithreading support) makes
it important to use proper C++ RAII style in order to avoid
memory leaks.
feat!(NODE-3472): convert to Node-API