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][tests][aot] warning: Unable to compile method in System.Runtime.Loader.DefaultContext.Tests #51680

Closed
radical opened this issue Apr 22, 2021 · 11 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono wasm-aot-test WebAssembly AOT Test
Milestone

Comments

@radical
Copy link
Member

radical commented Apr 22, 2021

Log
Build

/home/helixbot/work/B3DB0956/p/dotnet-cli/sdk/6.0.100-preview.2.21155.3/MSBuild.dll -maxcpucount -verbosity:m /bl:/home/helixbot/work/B3DB0956/w/A413090A/uploads/xharness-output/AOTBuild.binlog /p:RunAOTCompilation=true publish/AOTTestProjectForHelix.proj
  AOT'ing 38 assemblies
/home/helixbot/work/B3DB0956/p/build/wasm/WasmApp.targets(137,5): warning : Unable to compile method 'System.Reflection.Assembly System.Runtime.Loader.Tests.TestClass:GetRefEmitAssembly (string,System.Reflection.Emit.AssemblyBuilderAccess)' due to: 'Could not resolve type with token 0100001d from typeref (expected class 'System.Reflection.ConstructorInfo' in assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') assembly:System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Reflection.ConstructorInfo member:(null)'. [/home/helixbot/work/B3DB0956/w/A413090A/e/publish/AOTTestProjectForHelix.proj]
  Compiling native assets with emcc. This may take a while ...
@radical radical added arch-wasm WebAssembly architecture area-Codegen-AOT-mono wasm-aot-test WebAssembly AOT Test labels Apr 22, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 22, 2021
@ghost
Copy link

ghost commented Apr 22, 2021

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

Issue Details

Log
Build

/home/helixbot/work/B3DB0956/p/dotnet-cli/sdk/6.0.100-preview.2.21155.3/MSBuild.dll -maxcpucount -verbosity:m /bl:/home/helixbot/work/B3DB0956/w/A413090A/uploads/xharness-output/AOTBuild.binlog /p:RunAOTCompilation=true publish/AOTTestProjectForHelix.proj
  AOT'ing 38 assemblies
/home/helixbot/work/B3DB0956/p/build/wasm/WasmApp.targets(137,5): warning : Unable to compile method 'System.Reflection.Assembly System.Runtime.Loader.Tests.TestClass:GetRefEmitAssembly (string,System.Reflection.Emit.AssemblyBuilderAccess)' due to: 'Could not resolve type with token 0100001d from typeref (expected class 'System.Reflection.ConstructorInfo' in assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') assembly:System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Reflection.ConstructorInfo member:(null)'. [/home/helixbot/work/B3DB0956/w/A413090A/e/publish/AOTTestProjectForHelix.proj]
  Compiling native assets with emcc. This may take a while ...
Author: radical
Assignees: -
Labels:

arch-wasm, area-Codegen-AOT-mono, wasm-aot-test

Milestone: -

@lewing lewing added this to the 6.0.0 milestone Apr 24, 2021
@radical radical changed the title [wasm][tests][aot] Unable to compile method in System.Runtime.Loader.DefaultContext.Tests [wasm][tests][aot] warning: Unable to compile method in System.Runtime.Loader.DefaultContext.Tests Jun 15, 2021
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Jun 17, 2021
@radical
Copy link
Member Author

radical commented Jun 17, 2021

Should we change these warnings -> errors for the tracking PR?

@vargaz
Copy link
Contributor

vargaz commented Jul 5, 2021

Does this still happen ?

@lewing
Copy link
Member

lewing commented Jul 16, 2021

cc @SamMonoRT

@lewing lewing modified the milestones: 6.0.0, 7.0.0 Jul 16, 2021
@vargaz vargaz removed their assignment Jul 29, 2021
@ilonatommy
Copy link
Member

It still happens when System.Runtime.Loader gets enabled.

@vargaz
Copy link
Contributor

vargaz commented Jul 21, 2022

How can I reproduce this ?

@ilonatommy
Copy link
Member

Please, comment out:

<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.Loader\tests\System.Runtime.Loader.Tests.csproj" />

then run:

dotnet build -bl /t:Test src/libraries/System.Runtime.Loader/tests /p:Configuration=Release /p:RunAOTCompilation=true  /p:TargetOS=Browser

example of errors you should get:

Failed to load method 0x6000091 from '/workspaces/runtime/artifacts/bin/System.Runtime.Loader.Tests/Release/net7.0/browser-wasm/publish/Newtonsoft.Json.dll' due to Could not resolve type with token 0100002f from typeref (expected class 'System.Collections.ObjectModel.Collection`1' in assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51') assembly:netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type:System.Collections.ObjectModel.Collection`1 member:(null). [/workspaces/runtime/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj]

@vargaz
Copy link
Contributor

vargaz commented Jul 21, 2022

Why does tests.proj need to be changed ?

@vargaz
Copy link
Contributor

vargaz commented Jul 21, 2022

Also, shouldn't it be built using ./dotnet.sh ?

@ilonatommy
Copy link
Member

ilonatommy commented Jul 21, 2022

You're right, I've mistaken arguments. RunAOTCompilation != TestNativeAot. No commenting out needed to see the error. Dotnet.sh will have the same effect, you can use it as well.

@vargaz
Copy link
Contributor

vargaz commented Jul 21, 2022

Can't reproduce this with 908f440.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono wasm-aot-test WebAssembly AOT Test
Projects
None yet
Development

No branches or pull requests

4 participants