Skip to content

[runtime] Remove some dead code related to the embeddinator and unnecessary MONOMAC code.#24746

Open
rolfbjarne wants to merge 3 commits intomainfrom
dev/rolf/monomac-cleanup
Open

[runtime] Remove some dead code related to the embeddinator and unnecessary MONOMAC code.#24746
rolfbjarne wants to merge 3 commits intomainfrom
dev/rolf/monomac-cleanup

Conversation

@rolfbjarne
Copy link
Member

@rolfbjarne rolfbjarne commented Feb 19, 2026

No description provided.

@rolfbjarne rolfbjarne enabled auto-merge (squash) February 19, 2026 16:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LaunchMode enum and associated fields from managed and native InitializationOptions structures
  • Removed xamarin_initialize_embedded() function and XamarinLaunchModeEmbedded enum 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_path extern 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

Comment on lines 567 to 568
@@ -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.")]
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #63611d2] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 63611d2939046dc332c7e09c69cd632843bbd6f2 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #63611d2] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 63611d2939046dc332c7e09c69cd632843bbd6f2 [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments