[TrimmableTypeMap] Add UCO wrappers, RegisterNatives, and IAndroidCallableWrapper#10831
Closed
simonrozsival wants to merge 4 commits into
Conversation
This was referenced Feb 18, 2026
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 18, 2026 18:42
7b5ecb7 to
a03f521
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 18, 2026 18:42
132b798 to
9914c6e
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 18, 2026 22:55
a03f521 to
6772756
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 18, 2026 22:55
9914c6e to
0c90133
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 18, 2026 22:59
6772756 to
0ecbfd8
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
2 times, most recently
from
February 18, 2026 23:13
d18059a to
a235422
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
2 times, most recently
from
February 18, 2026 23:46
f8d83fe to
1b05635
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 18, 2026 23:46
e2a6a83 to
cd59ff8
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 18, 2026 23:52
1b05635 to
8287fe9
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
2 times, most recently
from
February 19, 2026 06:54
5cf8820 to
b6371e0
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
2 times, most recently
from
February 19, 2026 08:45
5d561c1 to
b582ff5
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 08:45
b6371e0 to
dcdc6cf
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 19, 2026 09:27
b582ff5 to
4c8b459
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 09:27
dcdc6cf to
687f7be
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 19, 2026 10:03
4c8b459 to
e3e4f05
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 10:03
687f7be to
10e549d
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 19, 2026 10:09
e3e4f05 to
9449651
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 10:09
10e549d to
f2a2cfa
Compare
simonrozsival
added a commit
that referenced
this pull request
Feb 19, 2026
Move UCO-specific JniSignatureHelper methods (JniParamKind, ParseParameterTypes, ParseReturnType, EncodeClrType, ParseSingleType) and their tests to PR #10831. Move JCW-specific scanner properties (BaseJavaName, ImplementedInterfaceJavaNames, JavaConstructors, JavaConstructorInfo) and resolver methods (ResolveBaseJavaName, ResolveImplementedInterfaceJavaNames, ResolveInterfaceJniName, BuildJavaConstructors) to PR #10830. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 10:59
f2a2cfa to
b709256
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 12:00
b709256 to
ca74680
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-generators
branch
from
February 19, 2026 12:07
d9bd575 to
163f892
Compare
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 12:07
ca74680 to
2574cc1
Compare
simonrozsival
added a commit
that referenced
this pull request
Feb 19, 2026
- Replace try-finally cleanup with IDisposable temp directories - Add IGCUserPeer infrastructure methods (monodroidAddReference, monodroidClearReferences, refList) to JCW Java source generator - Port improved UCO attribute and NegativeEdgeCase tests from #10831 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 13:28
8bc6d91 to
1b0a135
Compare
simonrozsival
added a commit
that referenced
this pull request
Feb 19, 2026
- Replace try-finally cleanup with IDisposable temp directories - Add IGCUserPeer infrastructure methods (monodroidAddReference, monodroidClearReferences, refList) to JCW Java source generator - Port improved UCO attribute and NegativeEdgeCase tests from #10831 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
February 19, 2026 13:29
1b0a135 to
a59275c
Compare
simonrozsival
added a commit
that referenced
this pull request
Feb 19, 2026
- Replace try-finally cleanup with IDisposable temp directories - Add IGCUserPeer infrastructure methods (monodroidAddReference, monodroidClearReferences, refList) to JCW Java source generator - Port improved UCO attribute and NegativeEdgeCase tests from #10831 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add scanner support for collecting marshal methods from Java peer types: - MarshalMethodInfo and JniParameterInfo data models - CompatJniName property for legacy layout XML support - CollectMarshalMethods, ParseExportAttribute, JNI signature parsing - JniSignatureHelper with bug fix for malformed L-type signatures - MakeMarshalMethod and MakeAcwPeer test helpers - Scanner tests for marshal method collection and CompatJniName This infrastructure is consumed by UCO wrappers (PR #10831) and Export support (PR #10811) generators. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lableWrapper Add ACW (Android Callable Wrapper) support to TypeMap proxy types: - UcoMethodData/UcoConstructorData/NativeRegistrationData model types - ModelBuilder: generates UCO method wrappers, constructor wrappers, and native method registrations for ACW types - TypeMapAssemblyEmitter: emits [UnmanagedCallersOnly] UCO methods, UCO constructor wrappers, RegisterNatives, IAndroidCallableWrapper - IsAcw detection for types that need JNI native method registration - Cross-assembly IgnoresAccessChecksTo for UCO callback types - Tests for all UCO/RegisterNatives generation scenarios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add JniParamKind enum, ParseParameterTypes, ParseReturnType, EncodeClrType, ParseSingleType, and their test classes (JniSignatureHelperTests, NegativeEdgeCase) — moved from PR #10808. Also add back JavaConstructors property, JavaConstructorInfo record, and BuildJavaConstructors scanner method needed by ModelBuilder. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix UCO attribute test to verify actual UnmanagedCallersOnlyAttribute type name instead of just Assert.NotEmpty(attrs) - Replace non-asserting NegativeEdgeCase Theory with three Facts that each assert a specific expected behavior - Remove duplicate SkipSingleType method; ParseParameterTypeStrings now reuses ParseSingleType to advance the index Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03b-uco-register-natives
branch
from
March 10, 2026 10:43
a59275c to
0a7c7b6
Compare
simonrozsival
changed the base branch from
dev/simonrozsival/trimmable-typemap-03-generators
to
dev/simonrozsival/trimmable-typemap-03-marshal-methods
March 10, 2026 10:43
simonrozsival
added a commit
that referenced
this pull request
Mar 10, 2026
Add scanner support for collecting marshal methods from Java peer types: - MarshalMethodInfo and JniParameterInfo data models - CompatJniName property for legacy layout XML support - CollectMarshalMethods, ParseExportAttribute, JNI signature parsing - JniSignatureHelper with bug fix for malformed L-type signatures - MakeMarshalMethod and MakeAcwPeer test helpers - Scanner tests for marshal method collection and CompatJniName This infrastructure is consumed by UCO wrappers (PR #10831) and Export support (PR #10811) generators. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
dev/simonrozsival/trimmable-typemap-03-marshal-methods
branch
from
March 10, 2026 15:08
01fb36d to
7f5c875
Compare
Member
Author
|
Closing this stale draft — it will be revisited once the base PR #10808 is merged. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Part of #10799
Summary
Adds ACW (Android Callable Wrapper) support to TypeMap proxy types, building on the groundwork from PR #10808.
Changes
UcoMethodData/UcoConstructorData/NativeRegistrationDatamodel typesModelBuilder: generates UCO method wrappers, constructor wrappers, and native method registrations for ACW typesTypeMapAssemblyEmitter: emits[UnmanagedCallersOnly]UCO methods, UCO constructor wrappers,RegisterNatives,IAndroidCallableWrapperinterface implementationIsAcwdetection for types that need JNI native method registrationIgnoresAccessChecksTofor UCO callback typesTests
Stacked PRs: