fix: NGO CoreCLR compatibility - #4171
NoelStephensUnity wants to merge 2 commits into
Conversation
Resolves the NGO CoreCLR test failures and re-enables every test that was disabled for CoreCLR. UUM-149592 - NetworkVariable serialization codegen not generated for some types - CoreCLR enforces generic constraints on method instantiations and Mono does not. The ILPP-generated NetworkVariableSerializationHelper.InitializeSerialization emitted InitializeEqualityChecker_HashSet<HashSet<int>>, which violates T : IEquatable<T>, so CoreCLR rejected the whole method and every type registered by that assembly fell back to FallbackSerializer. - Removed the IEquatable<T> constraint from InitializeEqualityChecker_HashSet<T> and EqualityEqualsHashSet<T>. Neither uses it, and #3891 already removed it from the rest of the HashSet serialization path to support nested HashSets. - NetworkBehaviourILPP now validates every emitted serializer and equality checker call against its generic constraints, and reports a compile error instead of emitting IL that CoreCLR rejects. UUM-149591 - integration tests fail to start server and client instances - Mostly a consequence of UUM-149592: player prefabs with NetworkVariables threw during synchronization, so connections never completed. - PeerDisconnectCallbackTests assumed client ids follow creation order. It now finds the target client by id. UUM-149595 - DAHost player-prefab fetch throws "An item with the same key has already been added" - NetworkClientAndPlayerObjectTests never cleared m_ChangedPlayerPrefabs between tests and keyed each fetched prefab on the last client's id. It now clears the dictionary on teardown and keys on the fetching client. UUM-149597 - unexpected owner write-permission error - OwnerPermissionHideTests assumed client ids follow creation order. Each object's owner is now chosen by client id. Removed all ENABLE_CORECLR [Explicit] and [UnityCoreClrExplicitDisabled] attributes. Every previously disabled test passes on CoreCLR (833/833), and the full PlayMode (5423 passed, 0 failed) and EditMode (1371 passed) suites pass on a trunk CoreCLR editor.
|
Check the configuration's TOML syntax, permitted settings, and size limit. See the error below. Error message: Configuration content:# This is the configuration for the u-pr bot
# https://github.cds.internal.unity3d.com/unity/u-pr
# For configuration of this file:
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/
[github_app]
handle_pr_actions = ['opened', 'ready_for_review'] # PR events that auto-run pr_commands
pr_commands = ["/harness-review"] # what runs on those events
reviewer_commands = ["/harness-review"] # what runs when @u-pr is added as reviewer
|
There was a problem hiding this comment.
💡 Harness Review
The change removes the unused HashSet equality constraint, validates generated serializer and equality calls, and re-enables CoreCLR tests. I examined the codegen paths, runtime equality behavior, client ID fixes, and test edits and found no actionable issues.
Reviewed commit 1892ab2
🤖 Helpful? 👍/👎
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop-3.x.x #4171 +/- ##
==============================================
Coverage 78.19% 78.19%
==============================================
Files 153 153
Lines 26272 26272
==============================================
Hits 20544 20544
Misses 5728 5728
Flags with carried forward coverage won't be shown. Click here to find out more.
|
BuildPlayer in BasicBuildTest hangs past the job timeout on the ubuntu CI agents, for both 6000.7 and trunk, while Windows and macOS pass. The same timeouts happen on the develop-3.x.x nightly. Ignored on Linux editors only, as a temporary measure until the ubuntu CI issue is resolved.
Purpose of this PR
Resolves the NGO CoreCLR test failures and re-enables every test that was disabled for CoreCLR.
Jira ticket
UUM-149592 - NetworkVariable serialization codegen not generated for some types
UUM-149591 - integration tests fail to start server and client instances
UUM-149595 - DAHost player-prefab fetch throws "An item with the same key has already been added"
UUM-149597 - unexpected owner write-permission error
UUM-150429 - Re-enable com.unity.netcode tests disabled for CoreCLR
Changelog
NA
Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Up-port
No up-port needed.
Backports
No back-port needed.