Skip to content

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

Closed
ViktorHofer wants to merge 1 commit into
dotnet:mainfrom
ViktorHofer:ProtectMemberNotNullAttribute
Closed

Keep MemberNotNullAttribute in sync for src <-> ref#66086
ViktorHofer wants to merge 1 commit into
dotnet:mainfrom
ViktorHofer:ProtectMemberNotNullAttribute

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

Contributes to #58163

Enable ApiCompat protection for the MemberNotNull attribute.

@ghost

ghost commented Mar 2, 2022

Copy link
Copy Markdown

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

ghost commented Mar 2, 2022

Copy link
Copy Markdown

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

stephentoub commented Mar 2, 2022

Copy link
Copy Markdown
Member

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

ViktorHofer commented Mar 2, 2022

Copy link
Copy Markdown
Member Author

See #66090 and please contribute to that discussion.

@bartonjs

bartonjs commented Mar 2, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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