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

async-ify all node:fs functions #5360

Merged
merged 4 commits into from
Sep 15, 2023
Merged

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Sep 14, 2023

What does this PR do?

This makes all node:fs functions which have an async or promise version and makes them actually async in the threadpool

this is not super optimized on linux. it really should use io_uring when supported. It does not. It does the slow thing.

I suspect this will fix #4743 but needs testing

How did you verify your code works?

Needs tests for everything

@github-actions
Copy link
Contributor

@Jarred-Sumner 14 files with test failures on linux-x64:

  • test/cli/install/bun-add.test.ts
  • test/cli/install/bun-install.test.ts
  • test/cli/install/bun-link.test.ts
  • test/cli/install/bun-pm.test.ts
  • test/cli/install/bun-remove.test.ts
  • test/cli/install/bun-run.test.ts
  • test/cli/install/bun-update.test.ts
  • test/cli/install/bunx.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/node/async_hooks/AsyncLocalStorage.test.ts
  • test/js/node/fs/cp.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/watch/fs.watch.test.ts
  • test/js/third_party/webpack/webpack.test.ts

View test output

#780755e8bfc3266a57ff2838e35a70b8b707e23e

@github-actions
Copy link
Contributor

@Jarred-Sumner 14 files with test failures on linux-x64-baseline:

  • test/cli/install/bun-add.test.ts
  • test/cli/install/bun-install.test.ts
  • test/cli/install/bun-link.test.ts
  • test/cli/install/bun-pm.test.ts
  • test/cli/install/bun-remove.test.ts
  • test/cli/install/bun-run.test.ts
  • test/cli/install/bun-update.test.ts
  • test/cli/install/bunx.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/node/async_hooks/AsyncLocalStorage.test.ts
  • test/js/node/fs/cp.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/watch/fs.watch.test.ts
  • test/js/third_party/webpack/webpack.test.ts

View test output

#780755e8bfc3266a57ff2838e35a70b8b707e23e

@github-actions
Copy link
Contributor

@Jarred-Sumner 15 files with test failures on bun-darwin-aarch64:

  • test/bundler/bundler_naming.test.ts
  • test/cli/install/bun-add.test.ts
  • test/cli/install/bun-install.test.ts
  • test/cli/install/bun-link.test.ts
  • test/cli/install/bun-pm.test.ts
  • test/cli/install/bun-remove.test.ts
  • test/cli/install/bun-run.test.ts
  • test/cli/install/bun-update.test.ts
  • test/cli/install/bunx.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/node/async_hooks/AsyncLocalStorage.test.ts
  • test/js/node/fs/cp.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/watch/fs.watch.test.ts
  • test/js/third_party/webpack/webpack.test.ts

View test output

#780755e8bfc3266a57ff2838e35a70b8b707e23e

@github-actions
Copy link
Contributor

@Jarred-Sumner 18 files with test failures on bun-darwin-x64-baseline:

  • test/bundler/bundler_compile.test.ts
  • test/cli/install/bun-add.test.ts
  • test/cli/install/bun-install.test.ts
  • test/cli/install/bun-link.test.ts
  • test/cli/install/bun-pm.test.ts
  • test/cli/install/bun-remove.test.ts
  • test/cli/install/bun-run.test.ts
  • test/cli/install/bun-update.test.ts
  • test/cli/install/bunx.test.ts
  • test/js/bun/spawn/spawn.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/bun/test/test-test.test.ts
  • test/js/node/async_hooks/AsyncLocalStorage.test.ts
  • test/js/node/fs/cp.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/watch/fs.watch.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/timers/setTimeout.test.js

View test output

#780755e8bfc3266a57ff2838e35a70b8b707e23e

@Jarred-Sumner Jarred-Sumner marked this pull request as ready for review September 15, 2023 01:44
@Jarred-Sumner Jarred-Sumner merged commit ced69d3 into main Sep 15, 2023
15 of 20 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/promisify-all-the-things branch September 15, 2023 04:26
paperdave pushed a commit to SuperAuguste/bun that referenced this pull request Sep 18, 2023
* async all node:fs functions

* draw the rest of the owl

* LLVM & Clang 16

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
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.

bun --bun run dev fails with nuxt
1 participant