Skip to content

[clr-ios] Run full test suite on Apple mobile platforms#123033

Open
kotlarmilos wants to merge 48 commits intodotnet:mainfrom
kotlarmilos:improvement/clr-ios-full-tests-suite
Open

[clr-ios] Run full test suite on Apple mobile platforms#123033
kotlarmilos wants to merge 48 commits intodotnet:mainfrom
kotlarmilos:improvement/clr-ios-full-tests-suite

Conversation

@kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Jan 9, 2026

Description

This PR enables runtime and library tests on Apple mobile platforms. All runtime tests are passing, and 195 out of 215 library test suites pass successfully. Disabled tests are tracked in #124344.

Fixes #120055

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 9, 2026
@lewing lewing removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 9, 2026
@kotlarmilos kotlarmilos marked this pull request as ready for review February 13, 2026 15:10
@kotlarmilos kotlarmilos added this to the 11.0.0 milestone Feb 13, 2026
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

Copilot reviewed 38 out of 38 changed files in this pull request and generated no new comments.

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings February 16, 2026 15:28
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

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

return (appContextKeys.ToString().TrimEnd(), appContextValues.ToString().TrimEnd(), propertyCount, propertyCountInvariant);
}

private Dictionary<string, string> ParseRuntimeConfigProperties(string workspace)
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

Consider adding a documentation comment for this method similar to the one in AndroidAppBuilder.ApkBuilder.cs (lines 709-711), which explains: "This method reads the binary runtimeconfig.bin file created by RuntimeConfigParserTask.ConvertDictionaryToBlob. The binary format is: compressed integer count, followed by count pairs of length-prefixed UTF8 strings (key, value). See src/tasks/MonoTargetsTasks/RuntimeConfigParser/RuntimeConfigParser.cs for the corresponding write logic." This would improve code maintainability and help future developers understand the binary format being parsed.

Copilot uses AI. Check for mistakes.
@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

public static bool IsMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") == "aot";
public static bool IsNotMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") != "aot";
public static bool IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported;
public static bool IsNativeAot => IsNotMonoRuntime && typeof(object).Assembly.GetType("Internal.Runtime.CompilerHelpers.StartupCodeHelpers") is not null;
Copy link
Member

Choose a reason for hiding this comment

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

I would expect RuntimeFeature.IsDynamicCodeSupported and IsReflectionEmitSupported to return true on CoreCLR (without NativeAOT).

Why do we need this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

On Apple mobile platforms IsDynamicCodeSupported should be false. This causes IsNativeAot to evaluate to true because IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported.

IsCoreCLR is defined as IsNotMonoRuntime && IsNotNativeAot and because IsNativeAot seems to be true on Apple mobile CoreCLR platforms, IsCoreCLR evaluates to false.

As a result Apple mobile CoreCLR ends up being classified as NativeAOT. I am now testing it on the CI.

Copy link
Member

Choose a reason for hiding this comment

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

On Apple mobile platforms IsDynamicCodeSupported should be false

It does not sound right to me. This property should be true when e.g. Reflection.Emit is supported. (There is another property IsDynamicCodeCompiled - this one should be false with interpreter.)

Is it like that on Mono? I guess we can keep it like that for compatibility with Mono, but it does make it right.

Copy link
Member Author

@kotlarmilos kotlarmilos Feb 16, 2026

Choose a reason for hiding this comment

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

Ok, thanks. This is currently overridden in the repo as:
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == '' and '$(MonoForceInterpreter)' != 'true'">false</DynamicCodeSupport>

Let’s fix this properly rather than keeping as Mono workaround.

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[clr-ios] Stand up library and runtime test on Apple mobile using interpreter + R2R

3 participants