Summary
PR #11123 adds trimmable [Export] / [ExportField] scanner, generator, and runtime dispatch support, but several end-to-end device test shapes are intentionally deferred because they currently fail before reaching the trimmable runtime path.
This issue tracks the focused follow-up needed to enable those device tests.
Missing device coverage
tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/ExportTests.cs currently enables 9 [Export] device tests. The following shapes remain covered only by host scanner/emitter tests and need end-to-end runtime tests once the JCW side can build them:
- enum
[Export] parameter/return shapes
Java.Lang.ICharSequence [Export] parameter/return shapes
- non-generic collection
[Export] parameter/return shapes (IList, IDictionary, ICollection)
[ExportField] runtime visibility/initialization shapes
Current blocker
The generated Java callable wrapper path rejects or mishandles some of these shapes before runtime validation can execute:
CecilImporter.GetJniSignature returns null for some managed enum, ICharSequence, and non-generic collection shapes while generating Java callable wrappers, causing the app build to fail before the trimmable export dispatch path can be exercised.
[ExportField] needs separate JCW field-initializer work before runtime coverage is meaningful; current field initialization can call the exported method with the wrong static/instance shape.
Expected outcome
After fixing the JCW side:
- Add the deferred device tests to
ExportTests.cs.
- Verify they pass for the legacy typemap path that defines the contract.
- Verify they pass for
_AndroidTypeMapImplementation=trimmable + UseMonoRuntime=false.
- Update PR/issue references so the host scanner/emitter coverage and device coverage are aligned.
Related: #10788, #10933, #11123.
Summary
PR #11123 adds trimmable
[Export]/[ExportField]scanner, generator, and runtime dispatch support, but several end-to-end device test shapes are intentionally deferred because they currently fail before reaching the trimmable runtime path.This issue tracks the focused follow-up needed to enable those device tests.
Missing device coverage
tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/ExportTests.cscurrently enables 9[Export]device tests. The following shapes remain covered only by host scanner/emitter tests and need end-to-end runtime tests once the JCW side can build them:[Export]parameter/return shapesJava.Lang.ICharSequence[Export]parameter/return shapes[Export]parameter/return shapes (IList,IDictionary,ICollection)[ExportField]runtime visibility/initialization shapesCurrent blocker
The generated Java callable wrapper path rejects or mishandles some of these shapes before runtime validation can execute:
CecilImporter.GetJniSignaturereturnsnullfor some managed enum,ICharSequence, and non-generic collection shapes while generating Java callable wrappers, causing the app build to fail before the trimmable export dispatch path can be exercised.[ExportField]needs separate JCW field-initializer work before runtime coverage is meaningful; current field initialization can call the exported method with the wrong static/instance shape.Expected outcome
After fixing the JCW side:
ExportTests.cs._AndroidTypeMapImplementation=trimmable+UseMonoRuntime=false.Related: #10788, #10933, #11123.