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

test: formalize exposure of internal bindings #18698

Closed
wants to merge 1 commit into from

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Feb 10, 2018

moves exposed internalBindings to a single location with short
guidelines on how to expose them and a warning for users should they
come across it.

i would also like to take this opportunity to discuss if these tests are needed. traditionally it seems we rely on internals working by ensuring the behavior of the publicly facing apis that depend on them, but after there was a bug with module_wrap i was encouraged to create a test for it.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. test Issues and PRs related to the tests. labels Feb 10, 2018
@devsnek
Copy link
Member Author

devsnek commented Feb 10, 2018

@devsnek devsnek removed the build Issues and PRs related to build files or the CI. label Feb 10, 2018
@devsnek
Copy link
Member Author

devsnek commented Feb 10, 2018

cc @nodejs/testing

@joyeecheung
Copy link
Member

i would also like to take this opportunity to discuss if these tests are needed. traditionally it seems we rely on internals working by ensuring the behavior of the publicly facing apis that depend on them, but after there was a bug with module_wrap i was encouraged to create a test for it.

I would say if there is a test case that is hard to cover with only public APIs, then go for it, but at least add a description to the test documenting why it has to directly test the binding.

node.gyp Outdated
@@ -126,6 +125,7 @@
'lib/internal/repl/await.js',
'lib/internal/socket_list.js',
'lib/internal/test/unicode.js',
'lib/internal/test/binding.js',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: order

moves exposed internalBindings to a single location with short
guidelines on how to expose them and a warning for users should they
come across it
@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 10, 2018
@devsnek devsnek added the fast-track PRs that do not need to wait for 48 hours to land. label Feb 10, 2018
@devsnek
Copy link
Member Author

devsnek commented Feb 10, 2018

landed in 3e8af96

@devsnek devsnek closed this Feb 10, 2018
devsnek added a commit that referenced this pull request Feb 10, 2018
moves exposed internalBindings to a single location with short
guidelines on how to expose them and a warning for users should they
come across it

PR-URL: #18698
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@devsnek devsnek deleted the internal-test-binding branch February 10, 2018 20:51
@MylesBorins
Copy link
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@devsnek devsnek removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 18, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request May 1, 2018
moves exposed internalBindings to a single location with short
guidelines on how to expose them and a warning for users should they
come across it

PR-URL: nodejs#18698
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
moves exposed internalBindings to a single location with short
guidelines on how to expose them and a warning for users should they
come across it

PR-URL: nodejs#18698
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorins
Copy link
Contributor

Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants