Support Fusebox shell experiment in OSS without a custom BrowserLauncher#53435
Support Fusebox shell experiment in OSS without a custom BrowserLauncher#53435motiz88 wants to merge 5 commits into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
…ebook#53436) Summary: Pull Request resolved: facebook#53436 Changelog: [Internal] Adds a `flavor` option to `unstable_spawnDebuggerShellWithArgs` to select between two modes: 1. `flavor: 'dev'` (current behaviour) - launching a stock Electron binary (from the `electron` package) and pointing it directly at the shell code from the `src/electron` directory. 2. `flavor: 'prebuilt'` (new in this diff) - launching the prebuilt React Native DevTools binary included in the package (built continuously at Meta and committed as a DotSlash file in automated diffs e.g. D79836825). Note that this binary includes Electron *and* a frozen version of the shell code from `src/electron`. Going forward, `'dev'` will only be used when developing the package (e.g. in D78351934 we will move `electron` to `devDependencies`). The published version of the package is only intended to work with `flavor: 'prebuilt'`. Differential Revision: D78351931 Reviewed By: huntie
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
0a06834 to
52f97f2
Compare
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
52f97f2 to
89b9b1d
Compare
…k#53434) Summary: Pull Request resolved: facebook#53434 Changelog: [Internal] The React Native DevTools standalone shell is distributed as a DotSlash file that downloads the required binaries lazily. This diff gives integrations a mechanism for kicking off the download early (but without slowing down `npm install react-native`). This will be integrated into dev-middleware in an upcoming diff. Differential Revision: D78413091 Reviewed By: huntie
…3437) Summary: Pull Request resolved: facebook#53437 Changelog: [Internal] The React Native DevTools standalone shell is distributed as a DotSlash file that downloads the required binaries lazily. This diff adds support in dev-middleware for a new `BrowserLauncher.unstable_prepareFuseboxShell` method that integrations can use to kick off the download early. Integrations are expected to implement this by calling the `unstable_prepareDebuggerShell` function (added to the `debugger-shell` package in D78413091). If `BrowserLauncher.unstable_prepareFuseboxShell` returns an error, dev-middleware will fall back to the browser-based launch flow, even for users opted into the `enableStandaloneFuseboxShell` experiment. Differential Revision: D78413092 Reviewed By: huntie
Summary: Pull Request resolved: facebook#53438 Changelog: [Internal] Makes `flavor: 'prebuilt'` the default mode of launching the RNDT standalone shell, and the *only* mode supported in the published version of the package. See D78351931 for more context. With this, we can demote `electron` from `dependencies` to `devDependencies`. This makes it possible to make `debugger-shell` a dependency of `dev-middleware` (and thus of all major frameworks) without significantly impacting `npm install` times. We'll add this dependency on `debugger-shell` in an upcoming diff (D78351937). We also stop publishing the `dist/electron` subdirectory (and `src/electron` for good measure) since the corresponding code will always be bundled into the prebuilt binary instead. Differential Revision: D78351934 Reviewed By: huntie
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
89b9b1d to
24ce29d
Compare
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
24ce29d to
6e3116f
Compare
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
6e3116f to
e38e1bb
Compare
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
e38e1bb to
0b2c349
Compare
…her (facebook#53435) Summary: Pull Request resolved: facebook#53435 Changelog: [Internal] Support setting `enableStandaloneFuseboxShell: true` in OSS with no custom `BrowserLauncher` Makes it possible for frameworks to enable the React Native DevTools standalone shell in open source by passing `unstable_experiments: {enableStandaloneFuseboxShell: true}` to `createDevMiddleware()`. When this experiment is enabled: * The RNDT shell binary will be prefetched in the background as soon as the dev server starts (into a local cache managed by [DotSlash](https://dotslash-cli.com/)). * If prefetching is successful, then "Open DevTools" actions will be handled by launching the RNDT frontend in the standalone shell, instead of in Chrome/Edge. * If prefetching is not successful, then we'll notify the user about the error, and "Open DevTools" will continue to be handled by Chrome/Edge, as before. * If the user attempts to open DevTools more than once for the same app, the standalone shell will reuse the existing window (as opposed to the current behaviour of always creating a new Chrome/Edge window). * The appropriate DevTools window will automatically foreground itself upon pausing on a breakpoint. Reviewed By: huntie Differential Revision: D78351937
|
This pull request was exported from Phabricator. Differential Revision: D78351937 |
0b2c349 to
a301f55
Compare
…her (facebook#53435) Summary: Pull Request resolved: facebook#53435 Changelog: [Internal] Support setting `enableStandaloneFuseboxShell: true` in OSS with no custom `BrowserLauncher` Makes it possible for frameworks to enable the React Native DevTools standalone shell in open source by passing `unstable_experiments: {enableStandaloneFuseboxShell: true}` to `createDevMiddleware()`. When this experiment is enabled: * The RNDT shell binary will be prefetched in the background as soon as the dev server starts (into a local cache managed by [DotSlash](https://dotslash-cli.com/)). * If prefetching is successful, then "Open DevTools" actions will be handled by launching the RNDT frontend in the standalone shell, instead of in Chrome/Edge. * If prefetching is not successful, then we'll notify the user about the error, and "Open DevTools" will continue to be handled by Chrome/Edge, as before. * If the user attempts to open DevTools more than once for the same app, the standalone shell will reuse the existing window (as opposed to the current behaviour of always creating a new Chrome/Edge window). * The appropriate DevTools window will automatically foreground itself upon pausing on a breakpoint. Differential Revision: D78351937 Reviewed By: huntie
|
This pull request has been merged in ab1af28. |
|
This pull request was successfully merged by @motiz88 in ab1af28 When will my fix make it into a release? | How to file a pick request? |
Summary:
Changelog: [Internal] Support setting
enableStandaloneFuseboxShell: truein OSS with no customBrowserLauncherMakes it possible for frameworks to enable the React Native DevTools standalone shell in open source by passing
unstable_experiments: {enableStandaloneFuseboxShell: true}tocreateDevMiddleware().When this experiment is enabled:
Differential Revision: D78351937