Skip to content

repl: do not define wasi on global with no flag - #45595

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
cola119:fix-45560
Nov 26, 2022
Merged

repl: do not define wasi on global with no flag#45595
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
cola119:fix-45560

Conversation

@cola119

@cola119cola119 commented Nov 23, 2022

Copy link
Copy Markdown
Member

Fixes#45560

In the REPL, prepareMainThreadExecution that updates the canBeRequiredByUsers flag of wasi module according to the flag is called after the internal/process/esm_loader.js load that creates builtinModules depending on the module.canBeRequiredByUsers flag. In this case, wasi.canBeRequiredByUsers is always true so wasi module always can be required by users even if the flag is not set.

constbuiltinModules=[];
for(const{0: id,1: mod}ofBuiltinModule.map){
if(mod.canBeRequiredByUsers&&
BuiltinModule.canBeRequiredWithoutScheme(id)){
ArrayPrototypePush(builtinModules,id);
}
}

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 23, 2022
@cola119cola119 added the repl Issues and PRs related to the REPL subsystem. label Nov 23, 2022
@cola119cola119 changed the title repl: do not defined wasi on global with no flagrepl: do not define wasi on global with no flagNov 23, 2022
Comment threadlib/internal/main/repl.js Outdated
Comment threadlib/internal/main/repl.js Outdated
@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. commit-queue Add this label to land a pull request using GitHub Actions. labels Nov 23, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 23, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 25, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/45595
✔ Done loading data for nodejs/node/pull/45595
----------------------------------- PR info ------------------------------------
Title repl: do not define `wasi` on global with no flag (#45595)
⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch cola119:fix-45560 -> nodejs:main
Labels repl, author ready, needs-ci
Commits 1
- repl: do not define `wasi` on global with no flag
Committers 1
- cola119 PR-URL: https://github.com/nodejs/node/pull/45595
Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca ------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/45595
Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca --------------------------------------------------------------------------------
ℹ This PR was created on Wed, 23 Nov 2022 08:48:35 GMT
✔ Approvals: 4
✔ - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/45595#pullrequestreview-1191699283
✔ - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/45595#pullrequestreview-1191760663
✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/45595#pullrequestreview-1192375682
✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/45595#pullrequestreview-1192246419
✔ Last GitHub CI successful
ℹ Last Full PR CI on 2022-11-23T22:44:37Z: https://ci.nodejs.org/job/node-test-pull-request/48141/
⚠ Commits were pushed after the last Full PR CI run:
⚠ - repl: do not define `wasi` on global with no flag
- Querying data for job/node-test-pull-request/48141/
✔ Last Jenkins CI successful
--------------------------------------------------------------------------------
✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/3546553264

@nodejs-github-botnodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Nov 25, 2022
@aduh95aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 25, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 25, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@cola119cola119 added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 25, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 25, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@cola119cola119 removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Nov 26, 2022
@cola119cola119 added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 26, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 26, 2022
@nodejs-github-bot
nodejs-github-bot merged commit 5a8895c into nodejs:mainNov 26, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 5a8895c

@cola119
cola119 deleted the fix-45560 branch November 26, 2022 11:16
targos pushed a commit that referenced this pull request Dec 12, 2022
PR-URL: #45595
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targostargos mentioned this pull request Dec 12, 2022
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #45595
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
PR-URL: #45595
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
PR-URL: #45595
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@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.needs-ciPRs that need a full CI run.replIssues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wasi incorrectly defined on global

6 participants

@cola119@nodejs-github-bot@lpinca@cjihrig@BridgeAR@aduh95