Hot reload

Some changes to DataMind Oda apply while it runs, and others wait for the next start. Hot reload is the part of Oda that applies changes in place: with it on, a plugin toggled or a settings file edited while Oda is open takes effect without a restart. This page shows which changes apply live, how Oda watches for them, and what the reload messages mean.

What applies while Oda runs

With hot reload on, these changes apply without a restart:

Where hot reload is on

What still needs a restart

How Oda watches for changes

Reloads run one at a time

When a reload fails

A reload that does not go through changes nothing: the version that was already running stays in place, and the previous configuration is kept until the new one applies. Reload messages use the short name HMR for hot reload.

MessageWhat it meansWhat to do
File: <file>:<line>:<column>A code change failed to compile while it was being reloaded, so it was not applied.Fix the file and position shown; the message includes a short code frame. Saving again retries the reload.
HMR is disposedHot reload had already shut down when the change arrived, so it could not be applied.Start Oda again; the change is picked up at the next start.
Profile HMR requires application readinessThe change arrived before Oda had finished starting. Configuration reloads run only after Oda is ready.Nothing; the change is applied once Oda has started.

If re-reading a watched settings file fails, Oda reports the failure and keeps the previous configuration; correct the file and save again.

Questions, answered

Why did my change not apply until I restarted Oda?

Either hot reload is off for the way Oda was running, or the change is one that always needs a restart, such as a swapped plugin version. The automation, SDK and headless profiles start with hot reload off, and with it off every change applies at the next start; see Oda profiles and launchers.

Do I need to restart Oda after changing a plugin or its settings?

Usually not. With hot reload on, plugin toggles, bundle installs and settings changes apply while Oda runs. Restart when you replace a plugin or bundle that is already installed, or change where a plugin's package comes from; see Plugins and bundles.

Why does Oda wait a moment before applying a saved settings file?

Oda re-reads a watched settings file only after its write has stopped changing for two seconds, so it never reads a file that is half-saved. If a reload is already running, your save waits its turn, and saves that land while one is running are not stacked up: the latest file state is what gets applied.

What happens to the running version when a reload fails?

Nothing changes. A failed reload keeps the version that was already running and the previous configuration; the failure is reported so you can fix it, and saving again retries the reload.

What do the file and position in a failed reload message point to?

The place in the code that failed to compile: File: <file>:<line>:<column>, followed by a short code frame. Fix the file at that position and save again to retry the reload.

What does "HMR is disposed" mean?

Hot reload had already shut down when the change arrived, so it could not be applied. Start Oda again; the change is picked up at the next start.

What does "Profile HMR requires application readiness" mean?

The change arrived before Oda had finished starting. Configuration reloads run only after Oda is ready; nothing is lost, and the change is applied once it has started.

Can two changes reload at the same time?

No. Every reload shares one queue and runs one after another, and a reload never starts inside another. A failed reload does not stop the queue: later changes are still applied.

Which folders does Oda watch for changes?

The settings files Oda manages are watched by their exact paths, wherever they sit. For code, a watch list (root) names the folders; it defaults to the folder Oda runs from, and an empty list keeps only the exact settings watches. node_modules, dot entries, cache and data are skipped by default.

If I delete a watched file, do its changes stop applying?

Yes. Creating, changing and deleting a watched file all count as changes, so when a settings file is deleted, the settings it added stop applying.

Does hot reload work in every way of running Oda?

It is on in the desktop app. The automation, SDK and headless profiles start with it off, and it can be switched back on in the settings file a profile keeps on this computer; see The profile settings file. With it off, changes apply at the next start.