Repository navigation
refactor: Hot reload's compiled-caller analysis moves into its own assembly, so only its entry point is reachable #3272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hatayama
merged 14 commits into
refactor/hot-reload-compiled-callers
from
refactor/hot-reload-compiled-callers-assembly
Oct 10, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e205c94
Move the compiled method identity, the call-site hit, and the caller-…
hatayama e90bfe5
Split building one-shot caller notes from attaching them to the run's…
hatayama de30405
Route hot reload's compiled-caller analysis through one entry point t…
hatayama 5f0ba28
Pin when a compiled-caller run takes and releases the cache hold, cou…
hatayama 884fa75
Pin that the referenced-method set warm-up reads each target's refere…
hatayama d44613b
Let the compiled-caller analysis assembly see the hot-reload shared k…
hatayama e3edb8e
Add the compiled-caller analysis assembly and reference it from hot r…
hatayama 2f94829
Say why the reflection type name is public: the metadata type name re…
hatayama 6ecb83d
Move hot reload's compiled-caller analysis into its own assembly behi…
hatayama 4b63334
Assert the warm-up E2E run-order tests only after their run finishes
hatayama 9996c27
Keep the contract members hot reload does not read internal to the co…
hatayama 6bcf3e2
Merge commit '4b6333483829d1a7b6aeb71b769e3b8f624f535c' into refactor…
hatayama 6ea0438
Merge remote-tracking branch 'origin/refactor/hot-reload-compiled-cal…
hatayama de936aa
State that the entry point's call-site search must run inside an open…
hatayama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
Packages/src/Editor/FirstPartyTools/Common/ScriptPath/AssemblyInfo.cs
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
8 changes: 8 additions & 0 deletions
8
Packages/src/Editor/FirstPartyTools/HotReload/CompiledCallers.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
Packages/src/Editor/FirstPartyTools/HotReload/CompiledCallers/AssemblyInfo.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| using System.Runtime.CompilerServices; | ||
|
|
||
| // Only the tests see these internals: the hot-reload application assembly uses this module | ||
| // through its entry point alone, and the compiler keeps it away from the parts behind it. | ||
| [assembly: InternalsVisibleTo("UnityCLILoop.Tests.Editor.HotReload")] |
11 changes: 11 additions & 0 deletions
11
Packages/src/Editor/FirstPartyTools/HotReload/CompiledCallers/AssemblyInfo.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
...load/CompiledCallers/UnityCLILoop.FirstPartyTools.HotReload.CompiledCallers.Editor.asmdef
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "UnityCLILoop.FirstPartyTools.HotReload.CompiledCallers.Editor", | ||
| "rootNamespace": "io.github.hatayama.UnityCliLoop.FirstPartyTools", | ||
| "references": [ | ||
| "GUID:1e3293e9639242278dcb27724b34beb4", | ||
| "GUID:fc3fd32eddbee40e39c2d76dc184957b", | ||
| "GUID:24d448abf7c10486d9578018b3a3c54b" | ||
| ], | ||
| "includePlatforms": [ | ||
| "Editor" | ||
| ], | ||
| "excludePlatforms": [], | ||
| "allowUnsafeCode": false, | ||
| "overrideReferences": true, | ||
| "precompiledReferences": [ | ||
| "Mono.Cecil.dll" | ||
| ], | ||
| "autoReferenced": false, | ||
| "defineConstraints": [], | ||
| "versionDefines": [], | ||
| "noEngineReferences": false | ||
| } |
7 changes: 7 additions & 0 deletions
7
...CompiledCallers/UnityCLILoop.FirstPartyTools.HotReload.CompiledCallers.Editor.asmdef.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hatayama/unity-cli-loop
Length of output: 19559
🏁 Script executed:
Repository: hatayama/unity-cli-loop
Length of output: 28632
Keep cache-affecting analysis helpers internal.
HotReloadCompiledCallersis now public, so application code can callFindCallSitesorWarmUpCallSitesAsyncwithoutBeginRunAsync.FindCallSitesreads an entry from the shared cache and then uses it afterTryGetOrLoadreturns. Without a run hold, a concurrent backfill can evict and dispose that entry while the scanner is using it. The analysis can then fail.Keep these helpers internal, or require a run created by
BeginRunAsyncbefore they can access the cache.Suggested fix
🤖 Prompt for AI Agents