Skip to content

[browser] failing blittable tests - src\tests\Interop\Interop.csproj #112963

Closed

Description

@pavelsavara

when building src\tests\Interop\Interop.csproj for browser with WasmBuildNative=true

Log

warning WASM0001: Could not get pinvoke, or callbacks for method 'ArrayWithOffsetNative::Marshal_InOut' because 'System.NotSupportedException: Unsupported parameter type in method 'ArrayWithOffsetNative.Marshal_InOut'
warning WASM0001: Could not get pinvoke, or callbacks for method 'ArrayWithOffsetNative::Marshal_InOut' because 'System.NotSupportedException: Unsupported parameter type in method 'ArrayWithOffsetNative.Marshal_InOut'
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'
message WASM0061: Type PInvokeTests.AutoStruct is not blittable: LayoutKind is not Sequential
warning WASM0001: Could not get pinvoke, or callbacks for method 'PInvokeTests.StructureTests::Invalid' because 'System.NotSupportedException: Unsupported parameter type in method 'PInvokeTests.StructureTests.Invalid'
warning WASM0001: Could not get pinvoke, or callbacks for method 'PInvokeTests.StructureTests::Invalid' because 'System.NotSupportedException: Unsupported parameter type in method 'PInvokeTests.StructureTests.Invalid'
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'
warning WASM0001: Could not get pinvoke, or callbacks for method 'PInvokeTests.StructureTests::InvalidReturn' because 'System.NotSupportedException: Unsupported parameter type in method 'PInvokeTests.StructureTests.InvalidReturn'
warning WASM0001: Could not get pinvoke, or callbacks for method 'PInvokeTests.StructureTests::InvalidReturn' because 'System.NotSupportedException: Unsupported parameter type in method 'PInvokeTests.StructureTests.InvalidReturn'
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'
message WASM0061: Type System.ArgIterator is not blittable: LayoutKind is not Sequential
warning WASM0001: Could not get pinvoke, or callbacks for method 'PInvokeTests.VarargsTest::TestArgIterator' because 'System.NotSupportedException: Unsupported parameter type in method 'PInvokeTests.VarargsTest.TestArgIterator'
warning WASM0001: Could not get pinvoke, or callbacks for method 'PInvokeTests.VarargsTest::TestArgIterator' because 'System.NotSupportedException: Unsupported parameter type in method 'PInvokeTests.VarargsTest.TestArgIterator'
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.<CollectPInvokes>g__CollectPInvokesForMethod|6_0(MethodInfo method, <>c__DisplayClass6_0&) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 113
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'
warning WASM0001: at PInvokeCollector.CollectPInvokes(List`1 pinvokes, List`1 callbacks, HashSet`1 signatures, Type type) in /_/src/tasks/WasmAppBuilder/PInvokeCollector.cs:line 75'

Activity

  1. ghost added
    needs-area-label
    on Feb 26, 2025
  2. added
    untriaged
    on Feb 26, 2025
  3. added
    arch-wasm
    os-browser
    and removed
    untriaged
    needs-area-label
    on Feb 26, 2025
  4. added this to the Future milestone on Feb 26, 2025
  5. dotnet-policy-service commented on Feb 26, 2025

    @dotnet-policy-service
    Contributor

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

  6. changed the title [-][browser] failing blittable tests with WasmBuildNative - src\tests\Interop\Interop.csproj[/-] [+][browser] failing blittable tests - src\tests\Interop\Interop.csproj[/+] on Feb 26, 2025
  7. pavelsavara commented on Feb 26, 2025

    @pavelsavara
    MemberAuthor

    cc @kg

  8. lewing commented on Feb 27, 2025

    @lewing
    Member

    Are we building this in CI regularly or trying to enable that?

  9. pavelsavara commented on Feb 27, 2025

    @pavelsavara
    MemberAuthor

    I tried to enable diagnostics for all lib tests (to see how profiler events are balanced). That triggers native re-link .... It was one-off test and it's easy to exclude this lib. I made issue because I was not sure if those scenarios should be supported on wasm or not

  10. lewing commented on Feb 27, 2025

    @lewing
    Member

    What exactly is the right thing to do here is a little complicated. We chose to warn in some of these cases rather than just fail at runtime, which may not have been correct, the interplay between real interop and what we've hacked together for wasm is complicated. I'll take a closer look at the tests.

  11. lewing commented on Jul 20, 2026

    @lewing
    Member

    this no longer tracks anything useful

  12. locked and limited conversation to collaborators on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Interop-monoos-browser

Type

No type

Projects

  • Status
    No status

Relationships

None yet

Development

No branches or pull requests

Issue actions