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

feat!(NODE-3472): convert to Node-API #137

Merged
merged 3 commits into from
Oct 1, 2021
Merged

feat!(NODE-3472): convert to Node-API #137

merged 3 commits into from
Oct 1, 2021

Conversation

addaleax
Copy link
Contributor

@addaleax addaleax commented Sep 22, 2021

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

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.
Copy link
Collaborator

@nbbeeken nbbeeken left a 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 🚀

src/unix/kerberos_unix.cc Outdated Show resolved Hide resolved
@mbroadst
Copy link
Member

Looks great, thanks for doing this!

Copy link
Member

@mbroadst mbroadst left a 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

Copy link
Collaborator

@dariakp dariakp left a 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

@nbbeeken nbbeeken merged commit e7e9e28 into master Oct 1, 2021
@nbbeeken nbbeeken deleted the 3472-dev branch October 1, 2021 18:26
nbbeeken pushed a commit that referenced this pull request Oct 6, 2021
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.

4 participants