Skip to content

chore: Swap Obsolete tags from warning to error - #4149

Open
michalChrobot wants to merge 9 commits into
develop-3.x.xfrom
remove-obsolete-apis
Open

chore: Swap Obsolete tags from warning to error#4149
michalChrobot wants to merge 9 commits into
develop-3.x.xfrom
remove-obsolete-apis

Conversation

@michalChrobot

@michalChrobot michalChrobot commented Sep 1, 2026

Copy link
Copy Markdown
Member

Purpose of this PR

This PR is focusing on updating all obsolete APIs to throw errors for 3.X release which should happen around end of this week (based on Emma doc),

Feel free to correct me on this PR

Jira ticket

N/A

Changelog

Deprecated: Several APIs that were already marked [Obsolete] with a warning now raise a compile error instead (they are not removed yet).

Documentation

We did some docs corrections so we should double check when Amy is back

Testing & QA (How your changes can be verified during release Playtest)

Green CI should be enough for this

Up-port

N/A

Backports

N/A

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The obsoletion sweep correctly routes in-package scene state through non-obsolete APIs, but it leaves published examples unusable and documents one API status inaccurately.

Reviewed commit 2a83dcb

🤖 Helpful? 👍/👎

Comment thread com.unity.netcode.gameobjects/CHANGELOG.md Outdated
@EmandM
EmandM requested a review from jabbacakes as a code owner September 1, 2026 18:05
@EmandM EmandM changed the title Made more obsolete apis throw errors chore: Swap Obsolete tags from warning to error Sep 1, 2026
@EmandM

EmandM commented Sep 2, 2026

Copy link
Copy Markdown
Member

/review

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The obsolete cleanup leaves legacy server RPC declarations supported, but changes how ownership violations behave on the sending client.

P1

Legacy [ServerRpc] declarations still compile (only the RequireOwnership field is error-obsolete), and the generated receive registration still defaults them to RpcInvokePermission.Owner; however, removing the ILPP ownership block also removes the sender-side guard. A non-owner calling a plain [ServerRpc] now passes __beginSendServerRpc (which only checks spawn state), serializes and sends the message, and receives no local RpcException; the server eventually drops it. Previously this call failed immediately on the client. This is observable for existing, still-supported ServerRpc code and can let caller logic proceed as though the request was accepted. Retain the sender-side owner check for legacy ServerRpc stubs (or route them through equivalent InvokePermission.Owner send validation) while keeping the receive-side validation.

Reviewed commit 2931b90

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@                Coverage Diff                @@
##           develop-3.x.x    #4149      +/-   ##
=================================================
+ Coverage          78.08%   78.12%   +0.04%     
=================================================
  Files                153      153              
  Lines              26273    26259      -14     
=================================================
+ Hits               20514    20516       +2     
+ Misses              5759     5743      -16     
Flag Coverage Δ
NGOv2_project_testproject_ubuntu_pinnedTrunk 77.75% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ponents/Interpolator/BufferedLinearInterpolator.cs 86.61% <ø> (ø)
...gameobjects/Runtime/Components/NetworkTransform.cs 88.75% <ø> (-0.04%) ⬇️
...bjects/Runtime/Configuration/CommandLineOptions.cs 25.92% <ø> (ø)
...cts/Runtime/Connection/NetworkConnectionManager.cs 82.21% <ø> (-0.02%) ⬇️
...tcode.gameobjects/Runtime/Core/NetworkBehaviour.cs 87.35% <100.00%> (+1.10%) ⬆️
...netcode.gameobjects/Runtime/Core/NetworkManager.cs 79.97% <ø> (+0.18%) ⬆️
....netcode.gameobjects/Runtime/Core/NetworkObject.cs 75.31% <100.00%> (+0.01%) ⬆️
...bjects/Runtime/Exceptions/NotListeningException.cs 0.00% <ø> (ø)
...ode.gameobjects/Runtime/Messaging/RpcAttributes.cs 0.00% <ø> (ø)
...Runtime/NetworkVariable/Collections/NetworkList.cs 79.75% <ø> (ø)
... and 3 more

... and 1 file with indirect coverage changes

Components Coverage Δ
com.unity.netcode.gameobjects 78.12% <100.00%> (+0.04%) ⬆️

ℹ️ Need help interpreting these results?

@EmandM

EmandM commented Sep 3, 2026

Copy link
Copy Markdown
Member

/review

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Ship it

I examined the obsolete-API conversion alongside the generated RPC and spawning paths, serialized scene-object handling, and updated documentation samples. The remaining call sites and parameter mappings are consistent with the new contracts, and I found no new actionable issues beyond those already reported.

Reviewed commit 66b69e7

⚠️ Earlier blocking summary findings: 1. The verdict above does not cover them; after addressing each one, hide the review that posted it.

🤖 Helpful? 👍/👎

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.

3 participants