[runtime] Remove some dead code related to the embeddinator and unnecessary MONOMAC code.#24746
[runtime] Remove some dead code related to the embeddinator and unnecessary MONOMAC code.#24746rolfbjarne wants to merge 3 commits intomainfrom
Conversation
…essary MONOMAC code.
There was a problem hiding this comment.
Pull request overview
This PR removes dead code related to the embeddinator and unnecessary MONOMAC-specific code. The embeddinator was a tool that allowed embedding Xamarin runtimes into native applications, but this functionality is no longer supported. The PR systematically removes all traces of this feature from both managed and native code.
Changes:
- Removed
LaunchModeenum and associated fields from managed and nativeInitializationOptionsstructures - Removed
xamarin_initialize_embedded()function andXamarinLaunchModeEmbeddedenum value - Simplified
GetEntryAssembly()method by removing MONOMAC fallback code that loaded assemblies from a path - Cleaned up bundle path logic to remove embedded mode special case
- Removed
xamarin_entry_assembly_pathextern declaration from headers
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/ObjCRuntime/Runtime.cs | Removed LaunchMode enum, removed LaunchMode/EntryAssemblyPath fields from InitializationOptions struct, simplified GetEntryAssembly() to only call Assembly.GetEntryAssembly() |
| runtime/xamarin/runtime.h | Removed xamarin_initialize_embedded() function declaration |
| runtime/xamarin/main.h | Removed XamarinLaunchModeEmbedded enum value and xamarin_entry_assembly_path extern declaration |
| runtime/runtime.m | Removed LaunchMode/EntryAssemblyPath fields from InitializationOptions struct, removed xamarin_initialize_embedded() function implementation, removed LaunchMode initialization code, simplified bundle path logic |
| runtime/monotouch-main.m | Removed XamarinLaunchModeEmbedded case from switch statement |
src/ObjCRuntime/Runtime.cs
Outdated
| @@ -581,12 +568,7 @@ static IntPtr PrintAllExceptions (IntPtr exception_gchandle) | |||
| [UnconditionalSuppressMessage ("", "IL2026", Justification = "We only want the entry assembly, and then we only want the entry point, which survives trimming.")] | |||
There was a problem hiding this comment.
The IL2026 suppression comment references 'System.Reflection.Assembly.LoadFile(String)' which is no longer called in this method after removing the MONOMAC fallback code. This comment should be updated to reflect that only Assembly.GetEntryAssembly() is now being called, or removed entirely if GetEntryAssembly() doesn't require this suppression.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #63611d2] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #63611d2] Build passed (Detect API changes) ✅Pipeline on Agent |
No description provided.