Skip to content

[API Compat] Add rule to validate members are not added to interfaces#18834

Merged
safern merged 2 commits intodotnet:mainfrom
safern:CannotAddMembersToInterface
Jul 9, 2021
Merged

[API Compat] Add rule to validate members are not added to interfaces#18834
safern merged 2 commits intodotnet:mainfrom
safern:CannotAddMembersToInterface

Conversation

@safern
Copy link
Copy Markdown
Member

@safern safern commented Jul 9, 2021

Fixes: #17928

I decided to not add a flag to specify if default implementations should be breaking as those can only appear on a runtime that supports them. If the target runtime that the code is being compiled for doesn't support that when adding a default implementation the compiler will error.

FYI: @terrajobst @utpilla

@safern safern added this to the 6.0.1xx milestone Jul 9, 2021
@safern safern requested review from Anipik and ericstj July 9, 2021 19:21
Comment thread src/Compatibility/Microsoft.DotNet.ApiCompatibility/Resources.resx Outdated
@safern safern enabled auto-merge (squash) July 9, 2021 20:18
@safern safern merged commit 36b29b3 into dotnet:main Jul 9, 2021
@safern safern deleted the CannotAddMembersToInterface branch July 9, 2021 21:41
Copy link
Copy Markdown
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ApiCompatibility] Add a new rule to detect breaking changes on updating contract of abstract classes/ interfaces

3 participants