Skip to content

live reload: disable after repeated failures, use vtmp for hot bins, flush exact size - #31402

Open
metif12 wants to merge 1 commit into
vlang:masterfrom
metif12:improve/hot-reload-robustness
Open

metif12 wants to merge 1 commit into
vlang:masterfrom
metif12:improve/hot-reload-robustness

Conversation

@metif12

@metif12 metif12 commented Oct 29, 2026

Copy link
Copy Markdown
Member

Follow-up improvements to the native live reload runtime (#31231).

Changes

  • Disable after repeated failures: track consecutive reload failures in a
    global counter; disable hot reload (and stop retrying) after 5 consecutive
    failures, reset on success. Prevents log spam when a function cannot be
    extracted (e.g. one that needs address fixups).
  • Hot-bin output path: write -hot-fn output to os.vtmp_dir() instead
    of hardcoded /tmp, so Windows targets work too.
  • Flush exact size: live_page_flush now takes the actual size instead
    of flushing a full 0x4000 block.

Verification

  • � fmt -l clean on the touched file.
  • Generated runtime still compiles (no signature mismatches).

These are non-breaking, additive improvements on top of the merged #31231.

@metif12
metif12 force-pushed the improve/hot-reload-robustness branch from f7223f8 to 4ed42d0 Compare October 30, 2026 20:40
…flush exact size

- Track consecutive reload failures in a global counter; disable hot
  reload (and stop retrying) after 5 consecutive failures. Reset on
  success. Prevents log spam when a function cannot be extracted.
- Write -hot-fn output to os.vtmp_dir() instead of hardcoded /tmp,
  so Windows targets work too.
- live_page_flush now takes the actual size instead of flushing a
  full 0x4000 block.
@metif12
metif12 force-pushed the improve/hot-reload-robustness branch from 4ed42d0 to 2b27d74 Compare October 31, 2026 07:17

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant