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

UnmanagedCallersOnly test failing in the outerloop during compilation #42125

Closed
janvorli opened this issue Sep 11, 2020 · 4 comments · Fixed by #42146
Closed

UnmanagedCallersOnly test failing in the outerloop during compilation #42125

janvorli opened this issue Sep 11, 2020 · 4 comments · Fixed by #42146

Comments

@janvorli
Copy link
Member

The issue seems to be due to some C# compiler update - the failures seem to be at places of negative testing that expects runtime failures, but we started to get compilation failures instead.

/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(341,6): error CS8896: 'UnmanagedCallersOnly' can only be applied to ordinary static methods or static local functions. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(341,6): error CS8896: 'UnmanagedCallersOnly' can only be applied to ordinary static methods or static local functions.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(439,6): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(439,6): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(440,48): error CS8894: Cannot use 'T' as a parameter type on a method attributed with 'UnmanagedCallersOnly'. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(440,48): error CS8894: Cannot use 'T' as a parameter type on a method attributed with 'UnmanagedCallersOnly'.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(520,10): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(520,10): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type.

Log here:
https://dev.azure.com/dnceng/public/_build/results?buildId=811186&view=logs&j=db768a9e-3325-5ce3-2d52-896c40bee68a&t=59112ad9-fe58-56ee-6943-84df6f0e3f8e&l=13792

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 11, 2020
@am11
Copy link
Member

am11 commented Sep 11, 2020

It would probably save some time if outerloop legs are auto triggered in the PR, which is changing global.json.

csc(1) errors out in this case since dotnet/roslyn#47008, maybe we can convert these (now)invalid methods into IL and continue to test the scenario.

@jkoritzinsky
Copy link
Member

I’m going to bring this up in the interop sync today so we can decide what we want to do.

@jkoritzinsky
Copy link
Member

cc: @AaronRobinsonMSFT @elinor-fung

@AaronRobinsonMSFT AaronRobinsonMSFT removed the untriaged New issue has not been triaged by the area owner label Sep 11, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT modified the milestones: 5.0.0, 6.0.0 Sep 11, 2020
@AaronRobinsonMSFT
Copy link
Member

Boo, but yay? Proves that the compiler is doing its job. I should be able to push up a PR later today with this fixed in the main branch. The plan of record is to move the non-C# friendly code to IL so the failure cases can be tested.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants