[XABT] Remove RunCheckedBuild / _AndroidJLOCheckedBuild infrastructure#11228
Open
jonathanpeppers wants to merge 1 commit intomainfrom
Open
[XABT] Remove RunCheckedBuild / _AndroidJLOCheckedBuild infrastructure#11228jonathanpeppers wants to merge 1 commit intomainfrom
RunCheckedBuild / _AndroidJLOCheckedBuild infrastructure#11228jonathanpeppers wants to merge 1 commit intomainfrom
Conversation
The RunCheckedBuild flag was temporary validation infrastructure introduced to verify that linker-based JLO scanning produced the same results as the old process. The flag was never set to true (no definitions of _AndroidJLOCheckedBuild exist anywhere), making all code gated behind it dead code. Removes: - RunCheckedBuild property from GenerateJavaStubs, GenerateTypeMappings, GenerateACWMap, and TypeMapGenerator - CompareScannedAssemblies/CompareLists validation methods - Redundant JCW generation in GenerateJavaStubs - NativeCodeGenState-based overload in ACWMapGenerator - Duplicate GenerateACWMap invocation in targets file - scannedAssemblies parameter from XAJavaTypeScanner.GetJavaTypes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the unused RunCheckedBuild / _AndroidJLOCheckedBuild validation infrastructure from Xamarin.Android.Build.Tasks, eliminating unreachable comparison/duplicate-generation code paths and simplifying task/target wiring.
Changes:
- Removed
RunCheckedBuild-gated code paths and associated plumbing across tasks/utilities. - Simplified typemap generation decisions to align with actual marshal-methods usage.
- Cleaned up MSBuild target invocations and task parameters related to the removed infrastructure.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Utilities/XAJavaTypeScanner.cs | Simplifies GetJavaTypes API by removing the checked-build-only scannedAssemblies tracking. |
| src/Xamarin.Android.Build.Tasks/Utilities/TypeMapGenerator.cs | Removes checked-build output comparison/duplicate output behavior; always writes the generated typemap output. |
| src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsCollection.cs | Updates call site for the new XAJavaTypeScanner.GetJavaTypes signature. |
| src/Xamarin.Android.Build.Tasks/Utilities/ACWMapGenerator.cs | Removes the checked-build-only Generate(NativeCodeGenState, ...) overload, keeping the JLO-driven path. |
| src/Xamarin.Android.Build.Tasks/Tasks/GenerateTypeMappings.cs | Drops RunCheckedBuild property and simplifies conditions/logging around native-state typemap generation. |
| src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs | Removes checked-build-only JCW generation/comparison plumbing and updates scanner call site. |
| src/Xamarin.Android.Build.Tasks/Tasks/GenerateACWMap.cs | Removes checked-build path and unused task properties; always generates from .jlo.xml ACW map entries. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.LlvmIr.targets | Removes checked-build parameters/duplicate task invocation; aligns MSBuild task parameters with updated task APIs. |
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.
Summary
The
RunCheckedBuildflag (set via_AndroidJLOCheckedBuildMSBuild property) was temporary validation infrastructure introduced to verify that linker-based JLO scanning produced the same results as the old process. The property is never defined or set totrueanywhere in the codebase — no.props, no.targets, no tests — making all code gated behind it unreachable dead code.This PR removes the entire
RunCheckedBuildinfrastructure across 8 files (290 lines deleted).Changes
GenerateJavaStubs.cs— Removed redundant JCW generation,CompareScannedAssemblies(),CompareLists(),scannedAssembliestracking, andGeneratedJavaFilespropertyGenerateTypeMappings.cs— Simplified condition fromRunCheckedBuild || useMarshalMethodsto justuseMarshalMethods, eliminating the redundant dual XML + NativeState type map generation pathTypeMapGenerator.cs— RemovedRunCheckedBuildproperty and comparison logic inGenerateNativeAssembly()GenerateACWMap.cs— Removed the checked build code path and unusedIntermediateOutputDirectorypropertyACWMapGenerator.cs— Removed theGenerate(NativeCodeGenState, string)overload (only used by checked build)XAJavaTypeScanner.cs— RemovedscannedAssembliesparameter fromGetJavaTypes()(only populated for checked build comparison)MarshalMethodsCollection.cs— UpdatedGetJavaTypes()call siteMicrosoft.Android.Sdk.TypeMap.LlvmIr.targets— RemovedRunCheckedBuildattributes,GeneratedJavaFilesattribute, and duplicateGenerateACWMapinvocation