Skip to content

refactor(3.0)!: delete dynamic Codec APIs and runtime fallback (#801) - #806

Merged
SunSi12138 merged 5 commits into
devfrom
cleanup/issue-801-3x-codec-api-retirement
Oct 11, 2026
Merged

SunSi12138 merged 5 commits into
devfrom
cleanup/issue-801-3x-codec-api-retirement

Conversation

@SunSi12138

Copy link
Copy Markdown
Owner

Goal

Implements the explicit 3.0 Codec API retirement decision in #801. Generated Contract/assembly-owned [RpcCodec] / Adapter / Route policies remain the authoritative RPC binding path. No standalone dynamic resolver, per-Context explicit AddCodec registration, or endpoint Server serializer override.

Production code

  • Delete SharpLinkRuntimeContextBuilder.AddCodec<T> and UseCodecResolver, SharpLinkServerBuilder.UseSerializer, and Client's old internal UseSerializer.
  • Remove the dynamic resolver, explicit override cache/priority, fallback ResolvedCodec state, and related immutable build-plan data from Runtime. Preserve owner-generated manifest registrations, snapshot publication, dependency checks, builtins, enums, 3.0 ABI validation and fail-closed behavior.
  • Update the reviewed 3.0.0 public API baseline, deleting the two Runtime and one Server signatures.
  • Adjust 3.0 UnsafeBlit / Codec migration guidance. Direct non-RPC serialization uses an explicitly instantiated IRpcCodec<T>; generated RPC uses its owning manifest.
  • Migrate direct Codec injection in test/bench code to a test-project-only generated Codec fixture. Remove obsolete fallback-specific tests and benchmark cases.

Branch and order

Built directly on dev after #799 was merged at a1f9ee2a7addfdf2bc86ae0598d99d5e5596cfe5. This PR contains only #801 cleanup differences, and does not change #799.

Verification

Draft — under active validation; do not merge yet.

  • Branch Release / UnitTests / Generator / Integration CI must be completely green.
  • Verify 3.0 public API baseline, external NuGet package clients, native AOT and Trim across supported platforms.
  • Check all test/bench-only callers are either migrated to generated bindings or removed as intentionally obsolete; no production fallback must be reintroduced to satisfy tests.

Related: #801 (Codec surface and dead-code retirement); #805 (remaining public/internal + sealed 3.0 audit); #799 (merged native AOT/Trim implementation).

Copy link
Copy Markdown
Owner Author

Exact-head evidence for the Codec API retirement

Source at c16a22185c17ec0f0bc740b7eebfdc1e0ea744d7, based on merged #799 (dev @ a1f9ee2a). This is the actual PR source, not an ephemeral deletion probe.

Still in progress: Android/iOS CoreCLR matrix and UnsafeBlit mobile/layout evidence. PR remains Draft until these results are reviewed.

Net result: public SharpLinkRuntimeContextBuilder.AddCodec<T>, UseCodecResolver, Server UseSerializer, Client internal UseSerializer, plus actual dynamic resolver and explicit-override backing state have been removed. Generated owner Codec/Adapter binding, AOT ABI capability, and runtime Core/Session ownership remain.

@SunSi12138
SunSi12138 marked this pull request as ready for review October 11, 2026 05:36
@SunSi12138
SunSi12138 merged commit d4cddbb into dev Oct 11, 2026
47 of 48 checks passed
@SunSi12138
SunSi12138 deleted the cleanup/issue-801-3x-codec-api-retirement branch October 11, 2026 05:47
SunSi12138 added a commit that referenced this pull request Oct 11, 2026
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.

1 participant