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

typings: remove unused primordials #48509

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Jun 21, 2023

This pull request removes unused and confusing primordials such as ArrayLength which corresponds to Array.length, and even though it is not used at all it is often get confused by Array.prototype.length.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

I think it's ok to remove them because they are useless for the codebase, but the typings are correct. ArrayLength is a number, not a function:
CleanShot 2023-06-21 at 17 51 30@2x

@anonrig anonrig added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 21, 2023
aduh95
aduh95 previously requested changes Jun 22, 2023
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

I have a few issues with this PR:

  • Can you fix the commit title so it says unused and not invalid? There's nothing invalid about them, e.g. ArrayLength is the primordial value of Array.length, which is arguably not very useful, but certainly not invalid.
  • Should we also remove the other ones that we deem not useful? E.g. ArrayName, the primordial value of Array.name is unlikely to ever be used in the codebase. Removing only .length feels arbitrary.
  • There's a non-zero risk that someone with good intentions sees it's missing and make essentially a revert PR so the types are complete again, so could you replace them with comments explaining why they are not included?

@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 22, 2023
@anonrig anonrig changed the title typings: remove invalid primordials typings: remove unused/confusing primordials Jun 22, 2023
@anonrig anonrig requested a review from aduh95 June 22, 2023 15:37
@anonrig anonrig changed the title typings: remove unused/confusing primordials typings: remove unused primordials Jun 22, 2023
@aduh95 aduh95 dismissed their stale review June 22, 2023 16:46

Still not convinced by this change, but blocking concerns have been addressed.

@anonrig anonrig added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 22, 2023
@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 22, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 23, 2023
@nodejs-github-bot nodejs-github-bot merged commit 4d00da3 into nodejs:main Jun 23, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 4d00da3

RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
PR-URL: #48509
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48509
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48509
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
ruyadorno pushed a commit that referenced this pull request Sep 10, 2023
PR-URL: #48509
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@ruyadorno ruyadorno mentioned this pull request Sep 10, 2023
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
PR-URL: #48509
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[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. typings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants