Skip to content

Conversation

@anonrig
Copy link
Member

@anonriganonrig 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

@targostargos 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

@anonriganonrig 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

@aduh95aduh95 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?

@aduh95aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 22, 2023
@anonriganonrig changed the title typings: remove invalid primordialstypings: remove unused/confusing primordialsJun 22, 2023
@anonriganonrigforce-pushed the update-primordials branch from 0b4be13 to 002699bCompareJune 22, 2023 15:36
@anonriganonrig requested a review from aduh95June 22, 2023 15:37
@anonriganonrigforce-pushed the update-primordials branch from 002699b to d9edc10CompareJune 22, 2023 15:38
@anonriganonrig changed the title typings: remove unused/confusing primordialstypings: remove unused primordialsJun 22, 2023
@anonriganonrigforce-pushed the update-primordials branch from d9edc10 to d3bd915CompareJune 22, 2023 15:39
@aduh95aduh95 dismissed their stale reviewJune 22, 2023 16:46

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

@anonriganonrig added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 22, 2023
@anonriganonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 22, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 23, 2023
@nodejs-github-botnodejs-github-bot merged commit 4d00da3 into nodejs:mainJun 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]>
@RafaelGSSRafaelGSS 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]>
@ruyadornoruyadorno 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs 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

@anonrig@nodejs-github-bot@lpinca@targos@aduh95