Skip to content

Conversation

@pavelsavara pavelsavara added this to the 11.0.0 milestone Feb 1, 2026
@pavelsavara pavelsavara self-assigned this Feb 1, 2026
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Infrastructure-coreclr os-browser Browser variant of arch-wasm labels Feb 1, 2026
Copilot AI review requested due to automatic review settings February 1, 2026 21:14
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

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 enables library tests for the Browser+CoreCLR configuration. Previously, these tests were run in smoke-only mode with shouldRunSmokeOnly: true; this PR switches to full test execution with shouldRunSmokeOnly: false and enables error continuation mode (shouldContinueOnError: true).

Changes:

  • Adds project-level exclusions for 6 test projects that are completely incompatible with Browser+CoreCLR (System.IO.FileSystem.Tests, System.Reflection.MetadataLoadContext.Tests, System.Reflection.Metadata.Tests, System.Runtime.Loader.Tests, System.Diagnostics.StackTrace.Tests, System.Reflection.Tests)
  • Adds granular test method exclusions across ~25 test projects using [ActiveIssue] attributes for tests that fail on Browser+CoreCLR due to interpreter reflection bugs and other known issues
  • Implements two new native function signatures (fii and iidi) to support additional delegate and runtime test scenarios on WebAssembly
  • Adds debugging improvements to detect when a debugger is not attached in WASM environments
  • Updates native interop tables with new function mappings (SystemNative_GetEUid, SystemNative_MProtect, SystemNative_FileSystemSupportsLocking reordering)

Reviewed changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
eng/pipelines/runtime.yml Enables full library test execution for Browser+CoreCLR (was smoke-only), adds continue-on-error flag
src/libraries/tests.proj Excludes 6 test projects incompatible with Browser+CoreCLR environment
src/tasks/WasmAppBuilder/coreclr/ManagedToNativeGenerator.cs Adds "fii" and "iidi" function signatures to support additional delegate scenarios
src/coreclr/vm/wasm/callhelpers-interp-to-managed.cpp Implements CallFunc_I32_I32_RetF32 and CallFunc_I32_F64_I32_RetI32 for new signatures
src/coreclr/vm/wasm/callhelpers-pinvoke.cpp Adds native function declarations (GetEUid, MProtect, FileSystemSupportsLocking), updates entry count to 100
src/coreclr/vm/wasm/callhelpers-reverse.cpp Updates hash keys for reverse thunks (numeric key changes for consistency)
src/coreclr/pal/src/arch/wasm/stubs.cpp Adds debugger attachment detection using time-based heuristic
src/libraries/System..Tests/.cs (25+ files) Adds [ActiveIssue] attributes to disable failing tests pending issue #123011 resolution

[Theory]
[InlineData(FormatterTypeStyle.TypesAlways)]
[InlineData(FormatterTypeStyle.TypesAlways | FormatterTypeStyle.XsdString)]
[SkipOnPlatform(TestPlatforms.Browser, "BinaryFormatter is not supported on Browser")]
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

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

Inconsistent attribute usage for Browser platform exclusion. In this file, lines 36 and 95 use [SkipOnPlatform(TestPlatforms.Browser, ...)], while the rest of the PR consistently uses [ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))] for Browser+CoreCLR combinations.

This inconsistency suggests these tests have a different reason for being disabled (BinaryFormatter not being supported) rather than the same issue (#123011) affecting other tests. However, this should be clarified - if these are related to issue #123011, they should use the same ActiveIssue attribute pattern for consistency.

Copilot uses AI. Check for mistakes.
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 73 out of 73 changed files in this pull request and generated 3 comments.

[Theory]
[InlineData(FormatterTypeStyle.TypesWhenNeeded)]
[InlineData(FormatterTypeStyle.XsdString)]
[SkipOnPlatform(TestPlatforms.Browser, "BinaryFormatter is not supported on Browser")]
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The SkipOnPlatform attribute is inconsistent with the rest of the PR which uses ActiveIssue for the same Browser+CoreCLR combination. For consistency with other test changes in this PR, this should use ActiveIssue with the same parameters as the rest of the changes: [ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]

Copilot uses AI. Check for mistakes.
emscripten_debugger();
double end = emscripten_get_now();
// trying to guess if the debugger was attached
if (end - start < 100)
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The 100ms threshold is a magic number used to determine if a debugger is attached. This value should be extracted to a named constant with a comment explaining why 100ms was chosen as the threshold. Additionally, this heuristic-based approach to detecting debugger attachment is fragile and may produce false positives/negatives depending on system load or debugger behavior.

Copilot uses AI. Check for mistakes.
alwaysRun: ${{ variables.isRollingBuild }}
shouldRunSmokeOnly: true
# TODO consider shouldContinueOnError: true
shouldRunSmokeOnly: false
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

This change enables all library tests for Browser CoreCLR (not just smoke tests) but also sets shouldContinueOnError: true. This means test failures won't block the build. While this is reasonable for an experimental feature being tested, it should be clearly documented whether this is intentional behavior for the current state of Browser+CoreCLR support or if this is temporary until the linked issue is resolved.

Suggested change
shouldRunSmokeOnly: false
shouldRunSmokeOnly: false
# Browser+CoreCLR library tests are experimental; keep this leg non-blocking
# so test failures do not fail the build until Browser+CoreCLR support is stabilized.

Copilot uses AI. Check for mistakes.
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 100 out of 100 changed files in this pull request and generated 3 comments.

Comment on lines 217 to 221
if (PlatformDetection.IsBrowser && PlatformDetection.IsCoreClr && items > 1024)
{
// TODO-WASM too slow https://github.com/dotnet/runtime/issues/123011
return;
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

PlatformDetection doesn't define IsCoreClr (only IsCoreCLR / IsCoreClrInterpreter etc). This will fail to compile; use the existing PlatformDetection.IsCoreCLR property (or the intended runtime check) in this Browser+CoreCLR perf guard.

Copilot uses AI. Check for mistakes.
Comment on lines 87 to 92
<!-- this is here because of python -->
<PackageReference Condition="'$(HostOS)' == 'windows' and '$(ShouldProvisionEmscripten)' != 'true'"
Include="Microsoft.NET.Runtime.Emscripten.$(EmsdkVersion).Python.win-x64"
PrivateAssets="all"
Version="$(EmsdkPackageVersion)"
GeneratePathProperty="true" />
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

This PackageReference condition depends on $(ShouldProvisionEmscripten), but that property is only set in AcquireEmscriptenSdk.targets, which is imported later in this project. During evaluation, the property will be empty here, so the condition will behave as if provisioning is not needed and can lead to incorrect/duplicate Emscripten Python package references. Consider importing AcquireEmscriptenSdk.targets before this ItemGroup, or change the condition to key off $(EMSDK_PATH) / $(TargetsBrowser) instead.

Copilot uses AI. Check for mistakes.
int32_t SystemNative_FTruncate (void *, int64_t);
int32_t SystemNative_FUTimens (void *, void *);
int32_t SystemNative_FcntlSetFD (void *, int32_t);
int32_t SystemNative_FileSystemSupportsLocking (void *, int32_t, int32_t);
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The return type for SystemNative_FileSystemSupportsLocking is declared here as int32_t, but the native signature is uint32_t (see src/native/libs/System.Native/pal_io.h / pal_io.c). Keeping the signature consistent avoids ABI/interop mismatches and makes it clear this is a boolean-like value.

Suggested change
int32_t SystemNative_FileSystemSupportsLocking (void *, int32_t, int32_t);
uint32_t SystemNative_FileSystemSupportsLocking (void *, int32_t, int32_t);

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 9, 2026 10:54
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 89 out of 89 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

src/libraries/sendtohelix-wasm.targets:1

  • This assignment unconditionally overrides any earlier _workItemTimeout value whenever RuntimeFlavor is CoreCLR, which can unintentionally defeat more specific timeouts set above (e.g., scenario-specific timeouts). If the intent is to provide a default only when no timeout is already specified, add a guard like and '$(_workItemTimeout)' == '', or otherwise structure the conditions so the most specific timeout wins.
    src/libraries/System.Linq/tests/OrderByDescendingTests.cs:1
  • Using return; silently turns the test into a no-op for those inputs, which can mask regressions and makes test reporting less clear. Prefer an explicit skip mechanism (e.g., an ActiveIssue/conditional attribute tied to the specific data case, or an assertion-based skip pattern used in this repo) so it's clearly reported as skipped rather than passed without executing.
    src/libraries/tests.proj:1
  • This new path mixes \\ and / separators, while the other ProjectExclusions entries in the same block use \\. For consistency (and to avoid any edge-case path normalization differences across tooling), consider using a consistent separator style here (matching the surrounding entries).

- browser_wasm
alwaysRun: ${{ variables.isRollingBuild }}
shouldRunSmokeOnly: true
# shouldRunSmokeOnly: false
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

Commenting out shouldRunSmokeOnly removes the setting rather than setting it to false, so the pipeline will fall back to whatever default behavior is defined elsewhere (which may still be smoke-only). If the goal is to enable all library tests, set shouldRunSmokeOnly: false as an actual YAML property (not a comment).

Suggested change
# shouldRunSmokeOnly: false
shouldRunSmokeOnly: false

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 10, 2026 11:36
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 109 out of 109 changed files in this pull request and generated 1 comment.

Comment on lines 4 to 9
<PropertyGroup>
<_workItemTimeout Condition="'$(Scenario)' == 'BuildWasmApps' and '$(_workItemTimeout)' == ''">01:30:00</_workItemTimeout>
<_workItemTimeout Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true'">01:00:00</_workItemTimeout>
<!-- TODO-WASM CoreCLR interpreter is about 7x slower than Mono at the moment -->
<_workItemTimeout Condition="'$(RuntimeFlavor)' == 'CoreCLR'">02:30:00</_workItemTimeout>

Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The CoreCLR-specific _workItemTimeout assignment will override any previously-set timeouts (e.g., the BuildWasmApps/NeedsToBuildWasmAppsOnHelix values) because the condition doesn’t check '$(_workItemTimeout)' == ''. Consider adding the same empty-check so scenario-specific settings remain effective unless no timeout was set yet.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 11, 2026 19:09
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 126 out of 126 changed files in this pull request and generated 6 comments.

Comment on lines 4 to 6
using System.Collections.Generic;
using System.Collections.Tests;
using System.Diagnostics;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

using System.Collections.Tests; is not used anywhere in this file. Unused usings can fail the build (warnings-as-errors); please remove it.

Copilot uses AI. Check for mistakes.
Comment on lines 4 to 6
using System.Collections.Generic;
using System.Collections.Tests;
using System.Linq;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

using System.Collections.Tests; is not used anywhere in this file. Unused usings can fail the build (warnings-as-errors); please remove it.

Copilot uses AI. Check for mistakes.

using System.Collections.Generic;
using System.Collections.Tests;
using System.Diagnostics;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

using System.Collections.Tests; is not used anywhere in this file. Unused usings can fail the build (warnings-as-errors); please remove it.

Suggested change
using System.Diagnostics;

Copilot uses AI. Check for mistakes.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using System.Collections.Tests;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

using System.Collections.Tests; is not used anywhere in this file. Unused usings can fail the build (warnings-as-errors); please remove it.

Suggested change
using System.Collections.Tests;

Copilot uses AI. Check for mistakes.
using System.Collections.Generic;
using System.Collections.Tests;
using System.Linq;
using System.Runtime.CompilerServices;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

using System.Collections.Tests; is not used anywhere in this file. Unused usings can fail the build (warnings-as-errors); please remove it.

Suggested change
using System.Runtime.CompilerServices;

Copilot uses AI. Check for mistakes.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

using System; appears to be unused in this file (no System.* types are referenced). With warnings treated as errors, this can break the build; please remove the unused using (or add a usage if intended).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Infrastructure-coreclr os-browser Browser variant of arch-wasm

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants