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 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 Issues and PRs related to the assert subsystem. benchmark Issues and PRs related to the benchmark subsystem. labels Nov 12, 2019
@addaleax addaleax added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 12, 2019
@dnlup dnlup force-pushed the fix_benchmark_assert branch from 585c821 to 350075c Compare November 12, 2019 18:56
@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 fix_benchmark_assert branch from 350075c to 294c7d6 Compare November 12, 2019 19:13
@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

Choose a reason for hiding this comment

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

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

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 fix_benchmark_assert branch from 294c7d6 to 769540a Compare November 13, 2019 16:22
@trivikr
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:

  • Label for other PRs code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events.
  • 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 PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 13, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

gireeshpunathil pushed a commit that referenced this pull request Nov 17, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@gireeshpunathil
Copy link
Member

landed in d1ce04c , thanks for the contribution!

BridgeAR pushed a commit that referenced this pull request Nov 19, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Nov 19, 2019
targos pushed a commit that referenced this pull request Dec 1, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
PR-URL: #30450
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
@dnlup dnlup deleted the fix_benchmark_assert branch January 10, 2020 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants