You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are all your remix dependencies & dev-dependencies using the same version?
Yes
Steps to Reproduce
Architect supports sandbox plugins that implement the sandbox.start method to launch arbitrary background services. (For example, my own plugin @nasa-gcn/architect-plugin-search starts up ElasticSearch to mock up Amazon OpenSearch).
If you are using the Remix v2_dev future feature with Architect and you have sandbox plugins, then every time that you change a file that triggers a rebuild (for example, a route module), it stops restarts all of the sandbox services. This results in a very sluggish and unpleasant DX.
Turning off v2_dev fixes the issue: with the v1 dev server, the sandbox plugins are started once when you launch npm run dev, and are not restarted when you touch files that trigger rebuilds.
Here is an example project with a trivial sandbox plugin that simply prints a message with console.log when it (re)starts.
Run npm run dev and make some changes to route module files. You should see the log message Starting example serviceonly once at the startup of npm run dev, and you should not see that log message repeated as you are changing the route module files.
Actual Behavior
On the example branch with v2_dev: true, you see the log message Starting example service when npm run dev starts, and then you see it again every time you save a change to a route module file.
The text was updated successfully, but these errors were encountered:
@lpsinger can you try using the --no-restart flag in your dev script? That should prevent restarts, but need to confirm that the sandbox plugin correctly sends dev ready messages during rebuilds.
What version of Remix are you using?
1.18.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Architect supports sandbox plugins that implement the
sandbox.start
method to launch arbitrary background services. (For example, my own plugin @nasa-gcn/architect-plugin-search starts up ElasticSearch to mock up Amazon OpenSearch).If you are using the Remix
v2_dev
future feature with Architect and you have sandbox plugins, then every time that you change a file that triggers a rebuild (for example, a route module), it stops restarts all of the sandbox services. This results in a very sluggish and unpleasant DX.Turning off
v2_dev
fixes the issue: with the v1 dev server, the sandbox plugins are started once when you launchnpm run dev
, and are not restarted when you touch files that trigger rebuilds.Here is an example project with a trivial sandbox plugin that simply prints a message with
console.log
when it (re)starts.v2_dev: true
- https://github.com/lpsinger/remix-bug-report-spurious-sandbox-starts/tree/dev-v2v2_dev: false
- https://github.com/lpsinger/remix-bug-report-spurious-sandbox-starts/tree/dev-v1Expected Behavior
Run
npm run dev
and make some changes to route module files. You should see the log messageStarting example service
only once at the startup ofnpm run dev
, and you should not see that log message repeated as you are changing the route module files.Actual Behavior
On the example branch with
v2_dev: true
, you see the log messageStarting example service
whennpm run dev
starts, and then you see it again every time you save a change to a route module file.The text was updated successfully, but these errors were encountered: