feat(magic-unity): reload Clojure sources on save in the ClojureCLR editor - #173
Merged
Merged
Conversation
skydread1
reviewed
Sep 7, 2026
skydread1
reviewed
Sep 7, 2026
skydread1
reviewed
Sep 7, 2026
parth-io
force-pushed
the
feat/editor-hot-reload
branch
from
September 7, 2026 09:58
5007ad3 to
1cf9507
Compare
…ditor (flybot-sg#157) DebouncedFileWatcher debounces multiple events from FileSystemWatcher upon one save. ClojureReloader polls this debounced event and retries reads if there is any race condition with the write
parth-io
force-pushed
the
feat/editor-hot-reload
branch
from
September 8, 2026 00:02
1cf9507 to
5cf5bc1
Compare
skydread1
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #157
DebouncedFileWatcherdebouncesFileSystemWatcherevents a single save emits for each path, after a 200 ms settle window.ClojureReloader.Poll()checks for debounced paths via the caller's thread and evaluates the Clojure source code; a read that races the write is retried once after 150 ms.Magic.Unity.Editor.Reload.asmdef, constrained to!MAGIC_RUNTIME_IN_EDITOR, so it compiles only in the Editor and when running ClojureCLR.InternalBufferSizeguards overflows on Windows, where there have been historical issues with dropped events. However, this is unverified on Windows.