Skip to content

Default IsDynamicCodeSupported feature switch to true for CoreCLR #80398

Description

@eerhardt

With #80246, we added a feature switch for RuntimeFeature.IsDynamicCodeSupported. Previously when you published a trimmed CoreCLR app, RuntimeFeature.IsDynamicCodeSupported was hard-coded to true, so any logic switching on that property was eligible to be trimmed. For example:

RuntimeFeature.IsDynamicCodeSupported ?
new ReflectionEmitCachingMemberAccessor() :
new ReflectionMemberAccessor();

When you publish a CoreCLR trimmed app, the ReflectionMemberAccessor class could be trimmed. Now that we have a feature switch, the property is no longer a constant.

We could enable this by setting featuredefault=true in the ILLink.Substitutions.xml file, but that runs into the issue described in #96539.

This issue is to track enabling this for trimmed CoreCLR applications. It is blocked by #96539.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 9, 2023
  2. added this to the 8.0.0 milestone on Jan 11, 2023
  3. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 11, 2023
  4. steveharter commented on Jul 24, 2023

    @steveharter
    Contributor

    @eerhardt is this still relevant for 8.0?

  5. added
    needs-author-actionAn issue or pull request that requires more info or actions from the author.
    on Jul 24, 2023
  6. eerhardt commented on Jul 24, 2023

    @eerhardt
    MemberAuthor

    @eerhardt is this still relevant for 8.0?

    It is still relevant, but It is blocked by #96539.

  7. ghost added
    needs-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration
    on Jul 24, 2023
  8. ghost removed
    needs-author-actionAn issue or pull request that requires more info or actions from the author.
    on Jul 24, 2023
  9. removed
    needs-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration
    on Aug 2, 2023
  10. steveharter commented on Aug 11, 2023

    @steveharter
    Contributor

    Moving to v9; assuming #96539 won't be done in v8.

  11. modified the milestones: 8.0.0, 9.0.0 on Aug 11, 2023
  12. added
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 17, 2024
  13. locked and limited conversation to collaborators on Jul 23, 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-System.Reflection.Emitin-prThere is an active PR which will close this issue when it is mergedsize-reductionIssues impacting final app size primary for size sensitive workloads

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions