The Wire · Showcase
RUNTIME HARDENS UNSAFE CALLS WHILE MAUI FIXES MERGE PIPELINE
By RepoJournal · Filed · About .NET
The CLR just shipped tooling to migrate LibraryImport toward unsafe-v2, plus allocation cuts in COM interop, while MAUI plugs gaps in its bot-driven merge policy.
EgorBo landed the big one: LibraryImportGenerator now participates in C#'s new unsafe-evolution rules [1], complete with an analyzer and code-fixer to automatically add `unsafe` keywords to existing [LibraryImport] calls that lacked safety annotations [2]. Nothing breaks under unsafe-v1, but this is the tooling your team needs before unsafe-v2 becomes the default. On the allocation front, Theodore Tsirpanis eliminated temporary array allocations in ComVariant.As by using `params ReadOnlySpan<VarEnum>` to reference RVA fields directly [3], a small win that compounds across high-traffic P/Invoke paths. Over in MAUI, two follow-ups landed on merge automation: PureWeen closed post-merge review findings on the finalize step [4], and fixed the bot-opened inter-branch policy to stop redundantly checking issue authors [5]. The team also ripped out blanket integration-test retries after discovering 98.2% of them reproduced identical failures anyway, cutting noise from the pipeline [6].
One email a day. Unsubscribe in one click.
Keep up with .NET in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Audit existing [LibraryImport] calls and run the new fixer to prepare for unsafe-v2 dotnet/runtime [plan]
- → Test MAUI artifacts from the merge-policy fixes if you run inter-branch automation dotnet/maui [monitor]
References
- [1] Support unsafe evolution in LibraryImportGenerator ↗ dotnet/runtime
- [2] Support unsafe evolution in LibraryImportGenerator (#131245) dotnet/runtime
- [3] Remove temporary array allocations in `ComVariant.As`. (#131704) dotnet/runtime
- [4] Address post-merge review findings on the PR finalize apply step ↗ dotnet/maui
- [5] Fix bot-opened inter-branch merge policy matching ↗ dotnet/maui
- [6] Remove ineffective blanket integration-test retry (#36994) dotnet/maui