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

Keep MemberNotNullAttribute in sync for src <-> ref #66086

Closed

Conversation

ViktorHofer
Copy link
Member

Contributes to #58163

Enable ApiCompat protection for the MemberNotNull attribute.

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Mar 2, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #58163

Enable ApiCompat protection for the MemberNotNull attribute.

Author: ViktorHofer
Assignees: ViktorHofer
Labels:

area-Infrastructure-libraries

Milestone: -

Enable ApiCompat protection for the MemberNotNull attribute.
@ViktorHofer ViktorHofer force-pushed the ProtectMemberNotNullAttribute branch from eeeb97a to 0bf3148 Compare March 2, 2022 15:22
@stephentoub
Copy link
Member

stephentoub commented Mar 2, 2022

Why are we doing this? It would only be relevant if the field in question was public/protected; I don't believe any of these are. This is leaking implementation details into the ref.

@stephentoub stephentoub added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Mar 2, 2022
@ViktorHofer
Copy link
Member Author

ViktorHofer commented Mar 2, 2022

See #66090 and please contribute to that discussion.

@bartonjs
Copy link
Member

bartonjs commented Mar 2, 2022

This is just noise in the ref.cs files, and creates situations which violate the "you shouldn't be changing this file without an appropriate api-approved issue" rule that goes along with them.

Whatever tooling we find ourselves using now or in the future can't put these in these files.

If we use roslyn to output these files as source, we can post-process them. But, as @stephentoub points out in the discussion issue, we don't want them in the ref.dll, either. So, until/unless we can get knobs in Roslyn to control that, our best Roslyn-powered flow would be to output the .cs, post-process it, and check it in.. then build that. Basically what we have right now with GenAPI (except we get to stop adding in language feature analysis).

@bartonjs bartonjs closed this Mar 2, 2022
@ViktorHofer
Copy link
Member Author

Thanks for taking the time to share your feedback Jeremy.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries new-api-needs-documentation NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants