Skip to content

Implement vm.compileFunction and fix some node:vm tests#18285

Merged
Jarred-Sumner merged 36 commits intomainfrom
zack/vm2
Mar 21, 2025
Merged

Implement vm.compileFunction and fix some node:vm tests#18285
Jarred-Sumner merged 36 commits intomainfrom
zack/vm2

Conversation

@zackradisic
Copy link
Contributor

@zackradisic zackradisic commented Mar 18, 2025

What does this PR do?

  • Implement vm.compileFunction (missing codeCache options)
  • WIP test-vm-basic.js
  • Fix test-vm-is-context.js
  • Fix test-vm-context.js
  • Fix test-vm-syntax-error-stderr.js
  • Fix test-vm-run-in-new-context.js
  • Fix test-vm-api-handles-getter-errors.js
  • Fix test-vm-strict-assign.js
  • Fix test-vm-options-validation.js

@robobun
Copy link
Collaborator

robobun commented Mar 18, 2025

Updated 7:37 PM PT - Mar 20th, 2025

@zackradisic, your commit 16674f2 has 1 failures in Build #13656:


🧪   try this PR locally:

bunx bun-pr 18285

@zackradisic
Copy link
Contributor Author

zackradisic commented Mar 20, 2025

The test-vm-basic.js test failures are expected

auto source_url = stack_frame.sourceURL(vm);
if (source_url.isEmpty()) {
// copy what Node does
source_url = "evalmachine.<anonymous>"_s;
Copy link
Collaborator

Choose a reason for hiding this comment

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

They hardcode evalmachine.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The output comes from V8 so I put this to match it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jarred-Sumner Jarred-Sumner merged commit 9f68db4 into main Mar 21, 2025
49 of 53 checks passed
@Jarred-Sumner Jarred-Sumner deleted the zack/vm2 branch March 21, 2025 02:08
@SunsetTechuila
Copy link
Contributor

SunsetTechuila commented Mar 23, 2025

this broke semantic-release compatibility with bun, which i fixed in #13590

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants