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: merge ToJsSet into ToV8Value #41757

Merged
merged 2 commits into from
Feb 13, 2022
Merged

src: merge ToJsSet into ToV8Value #41757

merged 2 commits into from
Feb 13, 2022

Conversation

addaleax
Copy link
Member

This addresses a TODO comment, and makes use of the opportunity
to also clean up our MaybeLocal handling in this area and
start accepting std::string_view where we accept std::string.

This addresses a `TODO` comment, and makes use of the opportunity
to also clean up our `MaybeLocal` handling in this area and
start accepting `std::string_view` where we accept `std::string`.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jan 29, 2022
@addaleax addaleax added dont-land-on-v12.x request-ci Add this label to start a Jenkins CI on a PR. and removed needs-ci PRs that need a full CI run. labels Jan 29, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2022
@nodejs-github-bot
Copy link
Collaborator

src/util.h Outdated Show resolved Hide resolved
@addaleax addaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2022
@nodejs-github-bot
Copy link
Collaborator

src/util-inl.h Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

LGTM with one tiny style nit, feel free to ignore.

Comment on lines +91 to +92
if (!ToV8Value(context, env->native_modules_with_cache)
.ToLocal(&native_modules_with_cache_js)) {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if allowed by the linter, but the . should not align with the ! IMO.

Suggested change
if (!ToV8Value(context, env->native_modules_with_cache)
.ToLocal(&native_modules_with_cache_js)) {
if (!ToV8Value(context, env->native_modules_with_cache)
.ToLocal(&native_modules_with_cache_js)) {

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if allowed by the linter

The c++ linter doesn't care about indentations for now.

but the . should not align with the ! IMO.

That would be 5 spaces instead of what's suggested in the style guide, i.e., 4 - https://github.com/nodejs/node/blob/HEAD/doc/contributing/cpp-style-guide.md#4-spaces-of-indentation-for-statement-continuations. Should the doc be updated with more info about this special case?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we’re following the 4-spaces rule pretty universally, and I wouldn’t change these kinds of cases to be special in that regard.

Comment on lines +103 to +104
if (!ToV8Value(context, env->native_modules_without_cache)
.ToLocal(&native_modules_without_cache_js)) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!ToV8Value(context, env->native_modules_without_cache)
.ToLocal(&native_modules_without_cache_js)) {
if (!ToV8Value(context, env->native_modules_without_cache)
.ToLocal(&native_modules_without_cache_js)) {

Comment on lines +115 to +116
if (!ToV8Value(context, env->native_modules_in_snapshot)
.ToLocal(&native_modules_without_cache_js)) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!ToV8Value(context, env->native_modules_in_snapshot)
.ToLocal(&native_modules_without_cache_js)) {
if (!ToV8Value(context, env->native_modules_in_snapshot)
.ToLocal(&native_modules_without_cache_js)) {

@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 7, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 7, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 11, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 11, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/41757
✔  Done loading data for nodejs/node/pull/41757
----------------------------------- PR info ------------------------------------
Title      src: merge ToJsSet into ToV8Value (#41757)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     addaleax:tovalue-set -> nodejs:master
Labels     c++, author ready, dont-land-on-v12.x, dont-land-on-v14.x, dont-land-on-v16.x
Commits    2
 - src: merge ToJsSet into ToV8Value
 - fixup! src: merge ToJsSet into ToV8Value
Committers 1
 - Anna Henningsen 
PR-URL: https://github.com/nodejs/node/pull/41757
Reviewed-By: Darshan Sen 
Reviewed-By: James M Snell 
Reviewed-By: Tobias Nießen 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/41757
Reviewed-By: Darshan Sen 
Reviewed-By: James M Snell 
Reviewed-By: Tobias Nießen 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sat, 29 Jan 2022 20:41:48 GMT
   ✔  Approvals: 3
   ✔  - Darshan Sen (@RaisinTen) (TSC): https://github.com/nodejs/node/pull/41757#pullrequestreview-868068814
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/41757#pullrequestreview-868352075
   ✔  - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/41757#pullrequestreview-874028296
   ✖  GitHub CI is still running
   ℹ  Last Full PR CI on 2022-02-07T18:04:12Z: https://ci.nodejs.org/job/node-test-pull-request/42424/
- Querying data for job/node-test-pull-request/42424/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/1829075152

@nodejs-github-bot nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Feb 11, 2022
@aduh95 aduh95 merged commit 34be1af into nodejs:master Feb 13, 2022
@aduh95
Copy link
Contributor

aduh95 commented Feb 13, 2022

Landed in 34be1af

bengl pushed a commit to bengl/node that referenced this pull request Feb 21, 2022
This addresses a `TODO` comment, and makes use of the opportunity
to also clean up our `MaybeLocal` handling in this area and
start accepting `std::string_view` where we accept `std::string`.

PR-URL: nodejs#41757
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
bengl pushed a commit to bengl/node that referenced this pull request Feb 21, 2022
This addresses a `TODO` comment, and makes use of the opportunity
to also clean up our `MaybeLocal` handling in this area and
start accepting `std::string_view` where we accept `std::string`.

PR-URL: nodejs#41757
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@bengl bengl mentioned this pull request Feb 21, 2022
bengl pushed a commit that referenced this pull request Feb 22, 2022
This addresses a `TODO` comment, and makes use of the opportunity
to also clean up our `MaybeLocal` handling in this area and
start accepting `std::string_view` where we accept `std::string`.

PR-URL: #41757
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-failed An error occurred while landing this pull request using GitHub Actions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants