Hot reload: what changes live

Hot reload is the part of DataMind Oda that applies changes in place, while it runs, instead of at the next start. This page shows which changes apply live, which ones wait for a restart, how Oda watches for changes, and what the reload messages mean.

What applies while Oda runs

With hot reload on, these changes take effect without a restart:

Where hot reload is on

What always waits for a restart

How Oda watches for changes

Reloads run one at a time

When a reload fails

A failed reload changes nothing: the version that was already running stays in place, and the previous configuration is kept until a valid change 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. A short code frame follows the line.Fix the file at the position shown and save again; the reload is retried.
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

Which changes apply without a restart?

With hot reload on: a plugin toggled on the Plugins page, an edit to the profile's settings file, and a code change covered by the watch list. Everything else waits for the next start.

Which ways of running Oda have hot reload on?

The desktop app runs with hot reload on. Automation, the SDK and headless runs start with it off, and a profile can turn it back on in the settings file it keeps on this computer; Oda profiles and launchers covers the ways Oda runs.

Why did a plugin or package change wait for a restart?

Some changes always wait: replacing an installed plugin or bundle with another version, and pointing a plugin name at a different package or folder. Oda refuses the live change with requires a process restart; make the change and start Oda again.

Why does Oda wait before applying a change I saved?

A watched settings file is re-read only after its content has stopped changing for two seconds, so a half-finished save is never read. If a reload is already running, your save waits its turn, and changes that land together apply as one, at the latest state.

Which folders does Oda watch for code changes?

The root watch list names them. It defaults to the folder Oda runs from, and an empty list keeps only the exact watches for the settings files Oda manages. node_modules, entries whose names start with a dot, cache and data are skipped by default.

What happens to the version that is running when a reload fails?

Nothing. A failed reload keeps the version that was already running and the previous configuration; once the cause is fixed and the file is saved again, the reload is retried.

Why does a failed reload show a file and a position?

The message File: <file>:<line>:<column> names the file that failed to compile and the position in it, followed by a short code frame. Fix that position and save again.

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 while Oda was still starting. Configuration reloads run only after Oda is ready; nothing is lost, and the change applies once the start finishes.

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.

Does deleting a watched file remove what it applied?

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