★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/30450Nouvelle recherche | Portail wanayoo
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

benchmark: use let instead of var in assert #30450

Closed
wants to merge 1 commit into from

Conversation

Copy link
Member

@dnlup dnlup commented Nov 12, 2019

Use let instead of var in benchmark/assert/deepequal-buffer.js.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added assert benchmark labels Nov 12, 2019
@addaleax addaleax added the code-and-learn label Nov 12, 2019
@dnlup dnlup changed the title benchmark: use let instead of var in assert [WIP] benchmark: use let instead of var in assert Nov 12, 2019
@dnlup dnlup changed the title [WIP] benchmark: use let instead of var in assert benchmark: use let instead of var in assert Nov 12, 2019
Copy link
Member

@trivikr trivikr left a comment

LGTM, just some nits

benchmark/assert/deepequal-map.js Outdated Show resolved Hide resolved
benchmark/assert/deepequal-set.js Outdated Show resolved Hide resolved
benchmark/assert/ok.js Outdated Show resolved Hide resolved
benchmark/assert/throws.js Outdated Show resolved Hide resolved
@SimonSchick
Copy link
Contributor

@SimonSchick SimonSchick commented Nov 13, 2019

Going slightly out of scope.
@trivikr if I was to submit a PR that changed all for(regular/in/of) loops to let/const respectively, would this be accepted?

@trivikr
Copy link
Member

@trivikr trivikr commented Nov 13, 2019

if I was to submit a PR that changed all for(regular/in/of) loops to let/const respectively, would this be accepted?

@SimonSchick Short answer is most likely "No"

This is one of the Code and Learn tasks from workshop at NodeConfEU:

  • Label for other PRs code-and-learn
  • Conference schedule https://www.nodeconf.eu/schedule/
    • Workshop was conducted at 1400 hours UTC+00:00 on Monday, November 11, 2019

There are many other PRs which are doing var to let/const replacements in other files.
If you are interested, please wait for some time (say a month) for all those PRs to be merged, and then create your PR. Other options:

  • go through all open code-and-learn PRs to find out which files are not touched
  • ping NodeConfEU code-and-learn organizers @jasnell / @addaleax / @BridgeAR to find files which are yet to be updated.

I don't recommend doing it for all files at once it'l be difficult to review. For example, we still use var at some places for:

I think you can replace vs to let/const on module basis (one PR for http, one for fs etc) so that only the particular module team can review it.

@BridgeAR BridgeAR added the author ready label Nov 13, 2019
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Nov 13, 2019

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Nov 17, 2019

gireeshpunathil pushed a commit that referenced this issue Nov 17, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@gireeshpunathil
Copy link
Member

@gireeshpunathil gireeshpunathil commented Nov 17, 2019

landed in d1ce04c , thanks for the contribution!

BridgeAR pushed a commit that referenced this issue Nov 19, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Nov 19, 2019
targos pushed a commit that referenced this issue Dec 1, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins pushed a commit that referenced this issue Dec 17, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
@dnlup dnlup deleted the fix_benchmark_assert branch Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert author ready benchmark code-and-learn
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants