GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src,lib: group properties used as constants from `util` binding by daeyeon · Pull Request #45539 · nodejs/node

Conversation

@daeyeon

@daeyeon daeyeon commented Nov 20, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The ways to create properties used as constants are scattered in util internal binding.
This PR gets them created in one code block and creates an object holding all of them.

Similar object patterns can be found in other bindings.

node/lib/dgram.js

Lines 71 to 75 in db88483

const {
constants: { UV_UDP_IPV6ONLY },
UDP,
SendWrap
} = internalBinding('udp_wrap');

node/lib/internal/perf/nodetiming.js

Lines 21 to 31 in db88483

const {
constants: {
NODE_PERFORMANCE_MILESTONE_NODE_START,
NODE_PERFORMANCE_MILESTONE_V8_START,
NODE_PERFORMANCE_MILESTONE_LOOP_START,
NODE_PERFORMANCE_MILESTONE_LOOP_EXIT,
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE,
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT
},
loopIdleTime,
} = internalBinding('performance');

Signed-off-by: Daeyeon Jeong [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@daeyeon
src,lib: group properties used as constants from util binding
8b95729
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Nov 20, 2022 •
edited by daeyeon
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup
  • @nodejs/cpp-reviewers
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Nov 20, 2022
@daeyeon daeyeon added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 20, 2022
RaisinTen
RaisinTen approved these changes Nov 21, 2022
View reviewed changes
@daeyeon daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 21, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 21, 2022
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
legendecas
legendecas approved these changes Nov 21, 2022
View reviewed changes
JungMinu
JungMinu approved these changes Nov 22, 2022
View reviewed changes
joyeecheung
joyeecheung reviewed Nov 22, 2022
View reviewed changes
Comment thread src/node_util.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon
fixup! src,lib: group properties used as constants from util binding
21e2ae8
Signed-off-by: Daeyeon Jeong <[email protected]>
@daeyeon daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2022
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@daeyeon
fixup! fixup! src,lib: group properties used as constants from util…
397662e
… binding

Signed-off-by: Daeyeon Jeong <[email protected]>
@daeyeon
daeyeon force-pushed the main.util-constants-221120.Sun.a9c7 branch from e1cc165 to 397662e Compare November 23, 2022 06:40
joyeecheung
joyeecheung approved these changes Nov 23, 2022
View reviewed changes
@daeyeon daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2022
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

nodejs-github-bot commented Nov 23, 2022

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/48125/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Nov 24, 2022
CI Reliability 2022-11-24 nodejs/reliability#438
Open
16 tasks
@daeyeon daeyeon added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 24, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 24, 2022
@nodejs-github-bot
nodejs-github-bot merged commit be9cd3e into nodejs:main Nov 24, 2022
@nodejs-github-bot

nodejs-github-bot commented Nov 24, 2022

Copy link
Copy Markdown
Collaborator

Landed in be9cd3e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon
daeyeon deleted the main.util-constants-221120.Sun.a9c7 branch November 24, 2022 02:56
@ruyadorno ruyadorno added the backport-requested-v19.x label Nov 24, 2022
@ruyadorno

ruyadorno commented Nov 24, 2022

Copy link
Copy Markdown
Member

@daeyeon be9cd3e does not land cleanly on the release branch v19.x-staging. It will need backporting.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 25, 2022
CI Reliability 2022-11-25 nodejs/reliability#439
Open
CI Reliability 2022-11-26 nodejs/reliability#440
Open
CI Reliability 2022-11-27 nodejs/reliability#441
Open
CI Reliability 2022-11-28 nodejs/reliability#442
Open
@daeyeon daeyeon mentioned this pull request Nov 29, 2022
[v19.x backport] src,lib: group properties used as constants from util binding #45674
Closed
@daeyeon daeyeon added backport-open-v19.x and removed backport-requested-v19.x labels Nov 29, 2022
daeyeon added a commit to daeyeon/node that referenced this pull request Nov 29, 2022
@daeyeon
src,lib: group properties used as constants from util binding
f06e8e9
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: nodejs#45539
Backport-PR-URL: nodejs#45674
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit that referenced this pull request Dec 12, 2022
@daeyeon @targos
src,lib: group properties used as constants from util binding
b401800
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #45539
Backport-PR-URL: #45674
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@targos targos added backported-to-v19.x and removed backport-open-v19.x labels Dec 12, 2022
@targos targos mentioned this pull request Dec 12, 2022
v19.3.0 release proposal #45831
Merged
targos pushed a commit that referenced this pull request Dec 13, 2022
@daeyeon @targos
src,lib: group properties used as constants from util binding
2fbe2f9
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #45539
Backport-PR-URL: #45674
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@danielleadams danielleadams mentioned this pull request Dec 30, 2022
v18.13.0 release proposal #46025
Merged
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
@daeyeon @danielleadams
src,lib: group properties used as constants from util binding
2887220
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #45539
Backport-PR-URL: #45674
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
@daeyeon @danielleadams
src,lib: group properties used as constants from util binding
90e8418
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #45539
Backport-PR-URL: #45674
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
@daeyeon @danielleadams
src,lib: group properties used as constants from util binding
b02b3c8
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #45539
Backport-PR-URL: #45674
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@harrisi harrisi mentioned this pull request Feb 19, 2023
.load infinite loop in REPL #46731
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@joyeecheung joyeecheung joyeecheung approved these changes
@JungMinu JungMinu JungMinu approved these changes
@legendecas legendecas legendecas approved these changes
@RaisinTen RaisinTen RaisinTen approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@daeyeon @nodejs-github-bot @ruyadorno @joyeecheung @JungMinu @legendecas @RaisinTen @targos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.