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

get node:fs tests passing part 1 #16270

Merged
merged 60 commits into from
Jan 15, 2025
Merged

get node:fs tests passing part 1 #16270

merged 60 commits into from
Jan 15, 2025

Conversation

paperclover
Copy link
Member

@paperclover paperclover commented Jan 9, 2025

this pr contains work towards getting node.js test for node:fs to pass.

note: this is a draft pr. opening early to get a ci run to see where regressions land

non-nodefs changes:

  • remove --expose-internals. this was the wrong strategy to pass node tests. to migrate, rewrite all uses of internalBinding to process.binding.

@robobun
Copy link

robobun commented Jan 9, 2025

Updated 7:02 PM PT - Jan 14th, 2025

@paperclover, your commit 91048cc has passed in #9601! 🎉


🧪   try this PR locally:

bunx bun-pr 16270

@paperclover paperclover marked this pull request as ready for review January 15, 2025 01:31
src/sys.zig Outdated
// enough bytes for a path alongside an error message and code.
// format taken from Node.js 'exceptions.cc'
// search keyword: `Local<Value> UVException(Isolate* isolate,`
var message_buf: [bun.MAX_PATH_BYTES + 2048]u8 = undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the buffer pool for this to avoid allocating 66 KB of stack space

try {
this[kRef]();
console.log({ fd, buffer, offset, length, position });
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
console.log({ fd, buffer, offset, length, position });

@paperclover paperclover enabled auto-merge January 15, 2025 02:49
@paperclover paperclover added this pull request to the merge queue Jan 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2025
@paperclover paperclover merged commit 834ad11 into main Jan 15, 2025
69 checks passed
@paperclover paperclover deleted the chloe/node-fs-1 branch January 15, 2025 04:53
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.

9 participants