Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Rename PreserveDependencyAttribute #805

Closed

Description

@stephentoub

I would like us to consider renaming PreserveDependencyAttribute, or if that's too breaking, add an additional name that the linker recognizes.

"PreserveDependency" speaks to the action a particular tool (in this case, the linker) is going to take based on the information provided, but really the attribute is used to say "this member has a dependency on that member", and a consuming tool can factor that information in however it likes. Thus, a name like "HasDependencyOn" or "ImplicitDependency" or "MemberDependency" or something that speaks to the state rather than to the follow-on action would be good.

This will become more important should we choose to expose this publicly: .https://github.com/dotnet/corefx/issues/41201.

Activity

  1. marek-safar commented on Oct 30, 2019

    @marek-safar
    Contributor

    I'd like this attribute to be publicly available, perhaps we should have a discussion over there. The attribute name is still used only internally so renaming is still an option.

  2. MattWhilden commented on Dec 19, 2019

    @MattWhilden

    Any update around this attribute? There's some desire to use it to resolve dotnet/runtime#978.

    If y'all think that PreserveDependency will be around for a while I may just teach the .NET Native compiler about that for the time being. Thoughts?

  3. stephentoub commented on Jan 11, 2020

    @stephentoub
    MemberAuthor

    I expect it'll be around in some form, and hopefully some variant of it ship in .NET 5, but it's still experimental and I expect we'll see some changes / additions around it.

  4. marek-safar commented on May 4, 2020

    @marek-safar
    Contributor

    Closing as the work is now tracked at #1148

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions