Repository navigation
[Java.Interop] Retire JavaTypeScanner and unused Cecil helpers - #13122
Merged
Merged
Conversation
Remove the unused public scanner and its internal attribute, export, and source adapters after the legacy consumers were retired. Preserve shared peer naming utilities and all remaining tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The intentional API retirement is internally consistent, and repository searches found no remaining consumers.
0 open findings
What changed in this PR
Retires obsolete Java callable-wrapper scanning code while preserving modern typemap scanning and shared naming utilities.
Changes:
- Removes the unused public
JavaTypeScanner. - Removes its obsolete Cecil adapter helpers.
- Updates test-catalog descriptions to reflect remaining coverage.
| File | Description |
|---|---|
JavaTypeScanner.cs |
Removes the retired legacy scanner. |
CecilExtensions.cs |
Removes helpers with no remaining consumers. |
test-catalog.md |
Updates test-suite scope and coverage notes. |
🧠 Review effort: Balanced
simonrozsival
enabled auto-merge (squash)
October 13, 2026 18:12
Member
Author
|
@dalexsoto review |
jonathanpeppers
approved these changes
Oct 13, 2026
simonrozsival
deleted the
simonrozsival-legacy-java-scanner-retirement
branch
October 13, 2026 20:08
Member
|
@simonrozsival Not reviewing this request in this iteration: The PR merged before the review could be completed, so no GitHub review will be submitted. |
17 of 21 tasks
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.
Remove
Java.Interop.Tools.JavaCallableWrappers.JavaTypeScannernowthat its last consumers were retired in #13080
and #13094. Also remove
Java.Interop.Tools.JavaCallableWrappers.Utilities.CecilExtensions:its type-registration adapter was used only by the scanner, and its
method/export/source adapters lost their consumers with the old emitter.
This intentionally retires the public tooling scanner without a stub.
Keep the assembly, shared naming/hash/identifier utilities, modern
JavaPeerScanner, and all remaining tests unchanged. Update only theexisting test-catalog descriptions that still advertised legacy scanning.
Binding-reference, tracked-source, linked-file, and configuration searches
found no live consumers. Comparing the baseline and final implementation
and reference assemblies shows only the two intended type removals; the
other 29 top-level definitions have identical IL after normalizing address
layout.
Validation: the own-worktree Debug SDK build and explicit affected
builds passed. Baseline/changed naming tests passed 18/18 and binding
generator tests passed 478/478. Generator-helper tests passed 18/18,
SDK-backed modern typemap tests passed 34/34, and focused host integration
passed 24/24 across CoreCLR and NativeAOT. Final runs have no failures or
skips, including all seven framework cases initially skipped before the
local SDK was prepared. Device tests were not run: this removes unused
host tooling and does not change generated code or runtime paths.
Local validation commands and results
All commands ran in this worktree, on the committed change based on
e03caec36337c9c5698cc60ca3e2ae50839636a5.dotnet build external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.csproj -c Debug -f netstandard2.0 -m:2 --disable-build-servers -v minimaldotnet test external/Java.Interop/tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj -c Debug -m:2 --disable-build-servers -v minimaldotnet test external/Java.Interop/tests/generator-Tests/generator-Tests.csproj -c Debug -m:2 --disable-build-servers -v minimaldotnet test external/Java.Interop/tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj -c Debug -m:2 --disable-build-servers -v minimaldotnet build external/Java.Interop/tools/generator/generator.csproj -c Debug -f net10.0 -m:2 --disable-build-servers -v minimaldotnet build external/Java.Interop/src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings.csproj -c Debug -f net10.0 -m:2 --disable-build-servers -v minimaldotnet build src/Microsoft.Android.Sdk.TrimmableTypeMap/Microsoft.Android.Sdk.TrimmableTypeMap.csproj -c Debug -f net11.0 -m:2 --disable-build-servers -v minimalmake prepare CONFIGURATION=Debug MSBUILD_ARGS='-m:2 --disable-build-servers -nr:false'make all CONFIGURATION=Debug MSBUILD_ARGS='-m:2 --disable-build-servers -nr:false -p:NinjaPath=/Users/simon/.copilot/session-state/2930120b-d71d-4dc9-b958-174c233d5b97/files/scanner-ninja-j2'./dotnet-local.sh build Microsoft.Android.slnx -t:BuildExtraApiLevels -c Debug -m:2 --disable-build-servers -nr:false -p:NinjaPath=/Users/simon/.copilot/session-state/2930120b-d71d-4dc9-b958-174c233d5b97/files/scanner-ninja-j2 -bl:/Users/simon/.copilot/session-state/2930120b-d71d-4dc9-b958-174c233d5b97/files/scanner-sdk-extra-apis.binlog./dotnet-local.sh build build-tools/create-packs/Microsoft.Android.Sdk.proj -t:ConfigureLocalWorkload -c Debug -m:2 --disable-build-servers -nr:false -v minimal./dotnet-local.sh build src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj -c Debug -m:2 --disable-build-servers -nr:false -v minimalnetstandard2.0, with own modern-framework dependencies; 30 existing warnings./dotnet-local.sh test src/Microsoft.Android.Build.Tasks/Tests/Microsoft.Android.Build.Tasks.Tests/Microsoft.Android.Build.Tasks.Tests.csproj -c Debug -m:2 --disable-build-servers -nr:false -v minimal --filter 'FullyQualifiedName~GenerateTrimmableTypeMapTests|FullyQualifiedName~TrimmableTypeMap' --logger 'trx;LogFileName=scanner-modern-framework.trx' --results-directory /Users/simon/.copilot/session-state/2930120b-d71d-4dc9-b958-174c233d5b97/filesThe session-only Ninja wrapper executes the prepared real Ninja with
-j2, without changing shared tools or repository build files.Focused host validation used the following selection:
Result: 24 passed, 0 failed, 0 skipped (7m27s). This covers binding
incrementality, default callbacks, constructor signatures, JNI-only R8
retention, reference/runtime packaging, and removal of unused bindings.
Resolved preparation/invocation failures: the first cold solution
compile lacked generated
ANDROID_*constants; an unchanged retryimported the generated project items. Local workload configuration needed
the existing
BuildExtraApiLevelstarget before API 37.1/37.2 packs wereavailable. Passing
-f netstandard2.0to the task project leaked thatframework to its modern dependencies; using its declared framework fixed
the invocation. The first host attempt put multiple response-file
arguments on one line; newline-separated arguments fixed it. All retries
used unchanged sources, without pin or build-file workarounds.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include:No linked issue; this is the follow-up retirement to #13080 and #13094.