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

feat(DevServer): batch bundles & run them asynchronously #15181

Merged
merged 45 commits into from
Nov 26, 2024

Conversation

paperdave
Copy link
Member

@paperdave paperdave commented Nov 16, 2024

What does this PR do?

Dev:

  • Remove waitFor calls, fixing a crash. there is now a "current bundle" and a bundle queue, which hold references to the requests pending on them. once the current bundle is finished, the "next bundle" is drained. the cool part of this is every bundle attempted is combined, deduplicated, and run all at once.
  • Document the atomics hell
  • Closes bake: assertion failure with invalid cache key #14913
  • Enable console buffering after printing reload message
  • Print a log when routes successfully bundle
  • Timer for reloads starts much earlier (timer is started on the watch thread); have not tested release build but if we continue showing 1ms then that is much more impressive than 1ms on previous branch.
  • Fix most but not all of the CSS reloading issues
  • Some usability bugs while testing

Prod:

  • Using the same entry point in a client and server part will bundle properly.

All:

  • Fixes parsing "style" from framework api

React integration:

  • Fix flash of unstyled content
  • Support view transitions
  • Back button uses an in memory cache of the page to avoid re-fetching

Non-bake

  • Bun.build supports plugins with loader: 'object'

@robobun
Copy link

robobun commented Nov 16, 2024

@paperdave, your commit 32dd4c6 has 15 failures in #6873:

  • test/regression/issue/09041.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/cli/hot/hot.test.ts - timeout on 🐧 3.20 x64-baseline
  • test/cli/hot/hot.test.ts - timeout on 🐧 3.20 x64
  • test/integration/next-pages/test/dev-server.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/integration/next-pages/test/dev-server.test.ts - 1 failing on 🐧 3.20 x64
  • test/js/node/test/parallel/worker-nested-uncaught.test.js - segmentation fault on 🐧 3.20 aarch64
  • test/js/node/test/parallel/worker-nested-uncaught.test.js - segmentation fault on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/worker-nested-uncaught.test.js - segmentation fault on 🐧 3.20 x64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 aarch64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 x64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 22.04 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 22.04 x64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 x64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 aarch64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 x64
  • test/js/bun/http/serve.test.ts - 1 failing on 🍎 14 x64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 aarch64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 x64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 x64-baseline
  • test/js/node/watch/fs.watch.test.ts - 4 failing on 🍎 14 aarch64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 aarch64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 20.04 x64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-assert-leaks.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-add-file-to-existing-subfolder.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-encoding.test.js - 2 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/child-process-exec-timeout-kill.test.js - 1 failing on 🍎 14 aarch64
  • test/js/web/fetch/fetch.tls.test.ts - 1 failing on 🍎 13 aarch64
  • test/js/web/fetch/fetch.tls.test.ts - 1 failing on 🍎 14 aarch64
  • @@ -1041,9 +1045,13 @@ pub const JSBundler = struct {
    JSC.markBinding(@src());
    Copy link
    Member

    Choose a reason for hiding this comment

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

    JSError!JSValue return type

    @dylan-conway dylan-conway merged commit dc01a5d into main Nov 26, 2024
    66 of 67 checks passed
    @dylan-conway dylan-conway deleted the dave/bake-async-bundling branch November 26, 2024 02:55
    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.

    bake: assertion failure with invalid cache key
    4 participants