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

Rename PreserveDependencyAttribute #805

Closed
stephentoub opened this issue Oct 30, 2019 · 4 comments
Closed

Rename PreserveDependencyAttribute #805

stephentoub opened this issue Oct 30, 2019 · 4 comments
Labels

Comments

@stephentoub
Copy link
Member

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.

@marek-safar
Copy link
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.

@MattWhilden
Copy link

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?

@stephentoub
Copy link
Member Author

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.

@marek-safar
Copy link
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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants