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

src,lib: move things away from util binding #30923

Closed
wants to merge 0 commits into from

Conversation

juanarbol
Copy link
Member

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Dec 12, 2019
@juanarbol
Copy link
Member Author

Ref: #30884

@addaleax
Copy link
Member

@juanarbol I’d definitely prefer making changes to process.binding() in JS land over making changes to the C++ level – otherwise we’ll just end up moving all of our code inside the C++ code base around from one binding to another. So what I’d have in mind is modifying process.binding() to return modified binding objects for an argument like util?

@juanarbol
Copy link
Member Author

Aaaah, I get it, so, the C++ binding (node_util.cc) shouldn't change, just wrap some of that C++ API to a different JS module, am I right?

@addaleax
Copy link
Member

@juanarbol Changing only process.binding() in JS is what I’d prefer, yes 👍

@juanarbol
Copy link
Member Author

Do you have any suggestion or a list of methods to be migrated?

@addaleax
Copy link
Member

@juanarbol I’m not sure – it’s really tricky figuring out where each native binding method stands in terms of userland usage. That’s part of why we should mvoe away from it, though :) For now, how about only providing the functions on process.binding('util'), and leave out the constants and maybe setHiddenValue/getHiddenValue? That’s kind of a small step but it might be good for getting us started.

@juanarbol juanarbol deleted the move-utils branch January 19, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants