Skip to content

Review reflection usage in src/Mono.Android.Export/CallbackCode.cs #5206

Description

@radekdoulik

We are preserving many types unconditinally in Mono.Android.xml because of reflection used here.

It should be possible to remove some of the types from the list as illink is smarter about reflection and hopefully also update some of the code to be more linker friendly.

Also use the new dependency attributes when possible.

Activity

  1. added this to the One .NET milestone on Oct 14, 2020
  2. self-assigned this
    on Oct 14, 2020
  3. modified the milestones: .NET 6, .NET 7 on Jun 14, 2021
  4. modified the milestones: .NET 7, .NET 8 on Jul 27, 2022
  5. jonpryor commented on Jul 27, 2022

    @jonpryor
    Contributor

    Pie-in-the-sky alternative: if jnimarshalmethod-gen ever becomes A Thing, then we can type-forward Java.Interop.ExportAttribute, Mono.Android to Java.Interop.ExportAttribute, Java.Interop and have build-time marshal method generation for [Export] methods.

  6. jonpryor commented on Jul 24, 2023

    @jonpryor
    Contributor

    This is already fixed, e.g. 15269f6, 6f9bc6b.

    I don't see any [Preserve] in src/Mono.Android.Export.

  7. locked and limited conversation to collaborators on Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: TrimmingIssues with ILLink or NativeAOT related to trimming.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions