Need to support side-loaded typemap files #1917
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
Area: App Runtime
Issues in `libmonodroid.so`.
Area: Commercial
Issues with non-OSS components.
enhancement
Proposed change to current functionality.
Milestone
The
typemap.jm
andtypemap.mj
files are produced as part of the packaging process byTypeNameMapGenerator
and the<GenerateJavaStubs/>
task.In order to help improve app performance (Issues #1443, #1829, #1830, #1831) we would like to require the presence and use of the
typemap
files, removing support for the Reflection-based fallback path, along with obsoletingJava.Interop.TypeManager.RegisterType(string, Type)
andJava.Interop.TypeManager.RegisterPackage()
andTypeManager.RegisterPackages()
.However, in order to fully use
typemap
files, we need to support them in Fast Deployment scenarios. The problem is that thetypemap
files are currently stored as per-.apk
data. As such, if a library assembly changes in a manner which requires updating the typemap files, theApp.apk
must be rebuilt and redeployed, if only to transfer the updatedtypemap
files.We need to update
src/monodroid
so that it will look for thetypemap
files in the.__override__
directories in addition to the.apk
files. We can then generatetypemap
files as per-Assembly data and side-load them along with the corresponding assemblies, ensuring that when a new Assembly is deployed to the device we also deploy updatedtypemap
files.As a suggestion, we could name the per-assembly files as
typemap-$(AssemblyBaseName).{jm,mj}
, e.g.typemap-Mono.Android.jm
andtypemap-Mono.Android.mj
.The text was updated successfully, but these errors were encountered: