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

[iOS] PlatformNotSupportedException in System.Linq.Expressions.Tests.GetDelegateTypeTests test suite #55068

Closed
MaximLipnin opened this issue Jul 2, 2021 · 2 comments
Labels
area-System.Linq.Expressions untriaged New issue has not been triaged by the area owner

Comments

@MaximLipnin
Copy link
Contributor

When trying to enable the interpretation mode for LambdaCompiler on iOS-like targets in #54970, some of the tests from the System.Linq.Expressions.Tests.GetDelegateTypeTests library test suite fail with PlatformNotSupportedException:

System.PlatformNotSupportedException : Operation is not supported on this platform.
   at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate(Type[] types)
   at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate(Type[] types)
   at System.Linq.Expressions.Compiler.DelegateHelpers.MakeDelegateType(Type[] types)
   at System.Linq.Expressions.Expression.GetDelegateType(Type[] typeArgs)
   at System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeFunc(Type[] typeArgs)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

The failing tests are:

  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeFunc(typeArgs: [typeof(string), typeof(System.Double*), typeof(int)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Int32*)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(int), typeof(System.String*), typeof(double)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(int), typeof(System.Int32&), typeof(string)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(string), typeof(System.Double*), typeof(int)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.String*)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.String*), typeof(System.String*), typeof(System.String*), typeof(System.String*), typeof(System.String*), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Span<char>)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Int32&)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Int32*), typeof(System.Int32*), typeof(System.Int32*), typeof(System.Int32*), typeof(System.Int32*), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Double&), typeof(System.Double&), typeof(System.Double&), typeof(System.Double&), typeof(System.Double&), ...])

https://github.com/dotnet/runtime/pull/54970/checks?check_run_id=2961997278

cc @steveisok

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Linq.Expressions untriaged New issue has not been triaged by the area owner labels Jul 2, 2021
@ghost
Copy link

ghost commented Jul 2, 2021

Tagging subscribers to this area: @cston
See info in area-owners.md if you want to be subscribed.

Issue Details

When trying to enable the interpretation mode for LambdaCompiler on iOS-like targets in #54970, some of the tests from the System.Linq.Expressions.Tests.GetDelegateTypeTests library test suite fail with PlatformNotSupportedException:

System.PlatformNotSupportedException : Operation is not supported on this platform.
   at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate(Type[] types)
   at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate(Type[] types)
   at System.Linq.Expressions.Compiler.DelegateHelpers.MakeDelegateType(Type[] types)
   at System.Linq.Expressions.Expression.GetDelegateType(Type[] typeArgs)
   at System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeFunc(Type[] typeArgs)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

The failing tests are:

  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeFunc(typeArgs: [typeof(string), typeof(System.Double*), typeof(int)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Int32*)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(int), typeof(System.String*), typeof(double)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(int), typeof(System.Int32&), typeof(string)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(string), typeof(System.Double*), typeof(int)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.String*)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), typeof(System.Collections.Generic.List<int>), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.String*), typeof(System.String*), typeof(System.String*), typeof(System.String*), typeof(System.String*), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Span<char>)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Int32&)])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Int32*), typeof(System.Int32*), typeof(System.Int32*), typeof(System.Int32*), typeof(System.Int32*), ...])
  • System.Linq.Expressions.Tests.GetDelegateTypeTests.CantBeAction(typeArgs: [typeof(System.Double&), typeof(System.Double&), typeof(System.Double&), typeof(System.Double&), typeof(System.Double&), ...])

https://github.com/dotnet/runtime/pull/54970/checks?check_run_id=2961997278

cc @steveisok

Author: MaximLipnin
Assignees: -
Labels:

area-System.Linq.Expressions, untriaged

Milestone: -

@MaximLipnin
Copy link
Contributor Author

Setting <IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting> in the test project file helped to address the issue, closing it.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Linq.Expressions untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

1 participant