Skip to content

esm: remove support for arrays in import internal method - #48296

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
aduh95:fewer-arrays-import
Jun 5, 2023
Merged

esm: remove support for arrays in import internal method#48296
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
aduh95:fewer-arrays-import

Conversation

@aduh95

@aduh95aduh95 commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

This avoids initializing arrays that we never use, and simplifies the implementation overall.

This had a purpose before #43772, but now we load everything serially making the array creation superfluous.

This avoids initializing arrays that we never use, and simplifies the
implementation overall.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/modules

@nodejs-github-botnodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Jun 2, 2023
@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 2, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 2, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jlenon7jlenon7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, much simpler to read the code.

@jlenon7jlenon7 mentioned this pull request Jun 2, 2023
4 tasks

@JakobJingleheimerJakobJingleheimer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch 🙂

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95

aduh95 commented Jun 2, 2023

Copy link
Copy Markdown
ContributorAuthor

Failures that seems to not be a flake, yet I don't see how it relates to this PR 🤔

not ok 106 parallel/test-child-process-pipe-dataflow
---
duration_ms: 221.12800
severity: fail
exitcode: 1
stack: |-
node:assert:125
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ '130086'
- '1048577'
at process.<anonymous> (C:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-child-process-pipe-dataflow.js:71:12)
at process.emit (node:events:523:35) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '130086',
expected: '1048577',
operator: 'strictEqual'
}
Node.js v21.0.0-pre
...

EDIT: no it is a flake, it's failing on other jobs as well, taking it to its own issue.

Comment threadlib/internal/modules/esm/hooks.js
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 5, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 5, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 9f3466b into nodejs:mainJun 5, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 9f3466b

@aduh95
aduh95 deleted the fewer-arrays-import branch June 5, 2023 08:59
targos pushed a commit that referenced this pull request Jun 5, 2023
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: #48296
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Jun 5, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: nodejs#48296
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: nodejs#48296
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: nodejs#48296
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Nov 23, 2023
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: #48296
Backport-PR-URL: #50669
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Nov 28, 2023
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: nodejs/node#48296
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: nodejs/node#48296
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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.esmIssues and PRs related to the ECMAScript Modules implementation.needs-ciPRs that need a full CI run.processIssues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@aduh95@nodejs-github-bot@ljharb@jasnell@GeoffreyBooth@benjamingr@targos@JakobJingleheimer@jlenon7@danielleadams