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

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

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jun 2, 2023

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
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/modules

@nodejs-github-bot nodejs-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
@aduh95 aduh95 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-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 2, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@jlenon7 jlenon7 left a comment

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.

@jlenon7 jlenon7 mentioned this pull request Jun 2, 2023
4 tasks
Copy link
Contributor

@JakobJingleheimer JakobJingleheimer left a comment

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
Collaborator

@aduh95
Copy link
Contributor Author

aduh95 commented Jun 2, 2023

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.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 5, 2023
@nodejs-github-bot nodejs-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:main Jun 5, 2023
@nodejs-github-bot
Copy link
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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request Jun 5, 2023
@danielleadams danielleadams added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Jun 30, 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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. labels Nov 23, 2023
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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[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. backported-to-v18.x PRs backported to the v18.x-staging branch. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants