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

@dnlup
Copy link
Contributor

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
@dnlup dnlup force-pushed the dnlup:fix_benchmark_assert branch from 585c821 to 350075c Nov 12, 2019
@dnlup dnlup mentioned this pull request Nov 12, 2019
2 of 2 tasks complete
@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 force-pushed the dnlup:fix_benchmark_assert branch from 350075c to 294c7d6 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 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

This comment has been minimized.

Copy link
Contributor

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?

@dnlup dnlup force-pushed the dnlup:fix_benchmark_assert branch from 294c7d6 to 769540a Nov 13, 2019
@trivikr

This comment has been minimized.

Copy link
Member

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:

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.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

gireeshpunathil added a commit that referenced this pull request 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

This comment has been minimized.

Copy link
Member

gireeshpunathil commented Nov 17, 2019

landed in d1ce04c , thanks for the contribution!

BridgeAR added a commit that referenced this pull request 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 added a commit that referenced this pull request 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 added a commit that referenced this pull request 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 dnlup: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
Projects
None yet
8 participants
You can’t perform that action at this time.