Repository navigation
[KS] Driver dev builds: source maps, /symbolicate, prebundled worker entry (#408) - #461
Open
sethwebster wants to merge 1 commit into
Open
sethwebster wants to merge 1 commit into
sethwebster wants to merge 1 commit into
Conversation
…worker entry (#408) The driver's bundle server (scripts/e2e/bundle-server.ts) now serves each bundle's source map, names the URL it served in the bundle's sourceURL as Metro does, and answers /symbolicate, so the profiler and LogBox map stacks of both runtimes. Driver runs bundle the worker entry in the background once the app's bundle is built; lazy bundling stays the fallback and failures are reported. profiling-dev now checks the worker's profile and source maps; the first-worker waits drop from 60 s to 30 s. Also: a failed session open closes the bundle server (a run no longer hangs on it), and clearing driver state leaves dirhelper's protected TemporaryItems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #408
What changed
scripts/e2e/bundle-server.ts(new): the driver's bundle server for dev builds. It serves/index.bundleand/.threaded-runtime/entry.bundle, their source maps (/index.map,/.threaded-runtime/entry.map), and Metro'sPOST /symbolicate. Like Metro's server, it rewrites each bundle's trailingsourceURL/sourceMappingURLto the URL that was actually served.export:embedwrites ahttp://localhost:8081/...sourceURL, which nothing serves, and Hermes names profile frames by it.DriverBackend) prebundle the worker entry in the background once the app's bundle is built. A request still bundles the entry lazily if the prebundle hasn't finished or failed. Failures go to stderr and are never silent. A failed build answers 500 and is retried.exportBundlewrites source maps.scripts/testing/source-map.tsnow indexes by line, returns source columns, and treats unmapped segments as unmapped.e2e/dev-flows/devtools/profiling-dev.yamlchecks that theks-devtoolsworker runs, writesisolated-ks-devtools.cpuprofile, and that both runtimes reportsource maps applied.KitchenSinkApp.open()now closes the bundle server when the session fails to open. Before, the runner never closed it and the run hung after its summary.TemporaryItems. Every operation on it fails with EPERM, so everyclearStateflow was failing.docs/e2e-flows.md(the driver backend) anddocs/devtools.md(Verification).Verification (run in this session)
bun run typecheck: passes.bun run e2e:lint: 0 problems.bun run test: 2008 passed, 2 failed. Both failures are the accepted ones:node-runtime(asdf shim) andmotion-nativeframes (display asleep).tests/e2e-bundle-server.test.ts(7 tests).tests/e2e-app-state.test.tsandtests/e2e-driver-backend.test.tswere updated.ks-lock native bun run e2e:run --backend driveron a dev build (rebuild:macos): plugins-load/unload/rejections/visual, multiwindow/isolated-runtime, infra/catalog-driver, dev-flows/devtools/profiling-dev, dev-flows/devtools/react-devtools-dev: 14 passed, 0 failed. plugins-load ran first, so it covered the first-worker case.bun run build,--app .../release/KitchenSink.app): 12 passed, 0 failed.