[.Net] Emits warning on common user patterns that may prevent ALC unloading#118357
Open
Delsin-Yu wants to merge 1 commit intogodotengine:masterfrom
Open
[.Net] Emits warning on common user patterns that may prevent ALC unloading#118357Delsin-Yu wants to merge 1 commit intogodotengine:masterfrom
Delsin-Yu wants to merge 1 commit intogodotengine:masterfrom
Conversation
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.
Partially implemented:
Related:
This is the
Analyzerpart of the proposal. The approaches for helping developers against the ALC unloading failures are:The inspiration of # 1 and # 3 entirely comes from this two-line discussion, and the documentation of the Tool that Unity builds for helping their users on migrating to Modern .Net, the author of this PR read 0 line of the Unity's implmentation, and are very certain that the analyzer in this PR have minimum overlaps wit the Unity's implmentation (as we don't host the running game within the Editor, so we don't need all of the static variable resetting attribute shenanegins).
AI Disclosure:
The Analyzer was developed by
Opus 4.6as the orchestrator, withGPT 5.4serving as a subagent under the author’s supervision. The cases the analyzer targets to prevent ALC unloading have been rigorously validated using isolated MRP projects to ensure accuracy. The analyzer has been adapted for use inGodot.SourceGenerators.csprojbyOpus 4.6, along with corresponding test suites. Additionally, the author manually modified some diagnostic warning messages to enhance clarity for general developers. A fresh instance ofGPT 5.4is also activated as an independent reviewer of the exact files modified in this PR to minimize inaccuracies.