Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Blazor/AOT tests failing because Microsoft.JSInterop.WebAssembly is not getting skipped for AOT #85010

Closed
radical opened this issue Apr 18, 2023 · 1 comment · Fixed by dotnet/sdk#31870
Labels
arch-wasm WebAssembly architecture area-Build-mono blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab test-failure
Milestone

Comments

@radical
Copy link
Member

radical commented Apr 18, 2023

WBT tests Workloads-Wasm.Build.Tests.Blazor.MiscTests breaking on rolling build. Log:

    Wasm.Build.Tests.Blazor.MiscTests.DefaultTemplate_AOT_InProjectFile(config: "Debug") [FAIL]
      Assert.DoesNotContain() Failure
      Found:    Microsoft.JSInterop.WebAssembly.dll -> Microsoft.JSInterop.WebAssembly.dll.bc
...

This is with sdk 8.0.100-preview.4.23218.17, and fails because of
https://github.com/dotnet/sdk/blob/4ea3e8304c21022bbea72a29154b7602af4f9239/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets#L22
and https://github.com/dotnet/sdk/blob/4ea3e8304c21022bbea72a29154b7602af4f9239/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets#L60 . Removing the duplicate at line 60 fixes the issue.

Known Issue Error Message

Fill the error message using known issues guidance.

{
  "ErrorPattern": "Found: *Microsoft.JSInterop.WebAssembly.dll -> Microsoft.JSInterop.WebAssembly.dll.bc",
  "BuildRetry": false
}

Report

Build Definition Test Pull Request
243658 dotnet/runtime Workloads-Wasm.Build.Tests.Blazor.MiscTests.WorkItemExecution #85009
243508 dotnet/runtime Workloads-Wasm.Build.Tests.Blazor.MiscTests.WorkItemExecution #80154

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
2 2 2
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Apr 18, 2023
@ghost
Copy link

ghost commented Apr 18, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

WBT tests Workloads-Wasm.Build.Tests.Blazor.MiscTests breaking on rolling build. Log:

    Wasm.Build.Tests.Blazor.MiscTests.DefaultTemplate_AOT_InProjectFile(config: "Debug") [FAIL]
      Assert.DoesNotContain() Failure
      Found:    Microsoft.JSInterop.WebAssembly.dll -> Microsoft.JSInterop.WebAssembly.dll.bc
...

This is with sdk 8.0.100-preview.4.23218.17, and fails because of
https://github.com/dotnet/sdk/blob/4ea3e8304c21022bbea72a29154b7602af4f9239/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets#L22
and https://github.com/dotnet/sdk/blob/4ea3e8304c21022bbea72a29154b7602af4f9239/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets#L60 . Removing the duplicate at line 60 fixes the issue.

Author: radical
Assignees: -
Labels:

arch-wasm, area-Build-mono, test-failure

Milestone: -

@radical radical added this to the 8.0.0 milestone Apr 18, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Apr 18, 2023
@radical radical added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Apr 18, 2023
radical added a commit to dotnet/sdk that referenced this issue Apr 19, 2023
- For blazor AOT, the blazor targets explicitly skip
  `Microsoft.JSInterop.WebAssembly.dll` in `_GatherBlazorFilesToPublish` target.
  - it is done by marking the assembly item in
    `@(WasmAssembliesToBundle)` with `%(AOT_InternalForceToInterpret)="true"`.

- this target needs to run after `_GatherWasmFilesToPublish` which builds
  the list of assemblies to AOT in `@(WasmAssembliesToBundle)`

- the order of these two targets was corrected in #31640
- but the changes in #31559 added the
  target twice, resulting in the order:

  `_GatherBlazorFilesToPublish;_GatherWasmFilesToPublish;_GatherBlazorFilesToPublish`

  1. in which the first `_GatherBlazorFilesToPublish` tries to remove
     the assembly from an empty list
  2. then `_GatherWasmFilesToPublish` populates the list
  3. and the last instance of `_GatherBlazorFilesToPublish` target
     doesn't run because it has already run before in (2).
- thus the assembly never gets removed from the list.

Fixes: dotnet/runtime#85010
radical added a commit to dotnet/sdk that referenced this issue Apr 19, 2023
- For blazor AOT, the blazor targets explicitly skip `Microsoft.JSInterop.WebAssembly.dll` in `_GatherBlazorFilesToPublish` target.
  - it is done by marking the assembly item in `@(WasmAssembliesToBundle)` with `%(AOT_InternalForceToInterpret)="true"`.

- this target needs to run after `_GatherWasmFilesToPublish` which builds the list of assemblies to AOT in `@(WasmAssembliesToBundle)`

- the order of these two targets was corrected in #31640
- but the changes in #31559 added the target twice, resulting in the order:

  `_GatherBlazorFilesToPublish;_GatherWasmFilesToPublish;_GatherBlazorFilesToPublish`

  1. in which the first `_GatherBlazorFilesToPublish` tries to remove the assembly from an empty list
  2. then `_GatherWasmFilesToPublish` populates the list
  3. and the last instance of `_GatherBlazorFilesToPublish` target doesn't run because it has already run before in (2).
- thus the assembly never gets removed from the list.

Fixes: dotnet/runtime#85010
@ghost ghost locked as resolved and limited conversation to collaborators May 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab test-failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant