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] Build improvements #61276

Merged
merged 7 commits into from
Nov 10, 2021
Merged

[wasm] Build improvements #61276

merged 7 commits into from
Nov 10, 2021

Conversation

radical
Copy link
Member

@radical radical commented Nov 6, 2021

Fixes #61067
Fixes #59538

@radical radical added the arch-wasm WebAssembly architecture label Nov 7, 2021
@ghost
Copy link

ghost commented Nov 7, 2021

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

Issue Details

Fixes #61067
Fixes #59538

Author: radical
Assignees: -
Labels:

arch-wasm, area-Build-mono

Milestone: -

We can use the captured output from the `Exec` task, but it would have
to be weirdly formatted to get the proper looking errors. Instead, since
the command itself is light, we just run it again, and this time surface
the output as Errors.

Fixes dotnet#61067
.. of throwing an exception.

```
 The "IcallTableGenerator" task failed unexpectedly. [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
 System.NotImplementedException: System.Enum [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
    at IcallTableGenerator.AppendType(StringBuilder sb, Type t) [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
    at IcallTableGenerator.ProcessType(Type type) [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
    at IcallTableGenerator.GenIcallTable(String runtimeIcallTableFile, String[] assemblies) [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
    at IcallTableGenerator.Execute() [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\uselessStuff\GameBuddy\src\Client\GameBuddy.Client.csproj]
```

becomes:

```
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-alpha.1.21551.1\Sdk\WasmApp.Native.targets(258,5):
    warning : Failed to generate icall function for [System.Private.CoreLib]System.Enum::InternalHasFlag because type System.Enum is not supported for parameter named flags. Ignoring. [C:\Users\Ankit Jain\bl0\bl0.csproj]
```

Prompted by dotnet#61053
@radical radical marked this pull request as ready for review November 8, 2021 00:15
@radical radical requested a review from lewing November 8, 2021 00:16
@radical radical merged commit 4952db9 into dotnet:main Nov 10, 2021
@radical radical deleted the wasm-improvements branch November 10, 2021 16:33
@lewing
Copy link
Member

lewing commented Nov 10, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1446184094

@github-actions
Copy link
Contributor

@lewing backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [wasm] Surface `emcc --version` failure output as Errors
Applying: [wasm] WasmAppBuilder: log IO exceptions when copying files, as errors
Applying: [wasm] IcallTableGenerator: For unsupported types, log a warning instead
Applying: [wasm] Wasm.Build.Tests: Re-enable net5.0 tests because 5.0.11 packages
Applying: [wasm] Add _CheckEmccIsExpectedVersion as explicit dependency for targets using emcc
error: sha1 information is lacking or useless (src/mono/wasm/build/WasmApp.Native.targets).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0005 [wasm] Add _CheckEmccIsExpectedVersion as explicit dependency for targets using emcc
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2021
@radical
Copy link
Member Author

radical commented Feb 7, 2022

/backport to release/6.0

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
Projects
None yet
2 participants