Skip to content

hot_reload does not pick up config.toml changes (likely inode-based watcher vs atomic-rename writes) #377

@ChrisGVE

Description

@ChrisGVE

Environment

  • rift 0.4.1 (Homebrew, launchd service homebrew.mxcl.rift)
  • macOS Darwin 25.5.0 (Tahoe)
  • hot_reload = true in config

Description

With hot_reload = true, changes to ~/.config/rift/config.toml are not applied. New windows created after the edit still follow the old rules. No errors in the service logs (/tmp/rift_chris.err.log / .out.log are empty).

Reproduction

  1. hot_reload = true in config.
  2. While rift is running, add an app rule, e.g. { app_id = "co.ensili.Yummy", floating = true } to app_rules (edit made with a tool that writes atomically, i.e. write-temp-then-rename — most editors do this).
  3. Launch the app: window is tiled, not floating. rift-cli query windows shows "is_floating": false.
  4. Restart rift: launchctl kickstart -k gui/$(id -u)/homebrew.mxcl.rift.
  5. Same window now reports "is_floating": true — the rule itself is valid, only the reload never happened.

Suspected cause

Atomic-rename saves replace the file's inode. If the watcher follows the original inode (or watches the file directly rather than its parent directory), it never sees subsequent modifications. Watching the parent directory for rename/create events on the config filename (what most file watchers do to handle editor atomic writes) would fix it.

Notes

  • Related: Expose ReloadConfig as a command in keybindings #348 (expose ReloadConfig as a keybinding command) — a manual reload command would also be a useful workaround when hot reload misses changes.
  • Workaround for anyone else hitting this: kick the service after each config change with launchctl kickstart -k gui/$(id -u)/homebrew.mxcl.rift.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions