-
Notifications
You must be signed in to change notification settings - Fork 41
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
Disallow new abstract
type members
#259
Conversation
- #146 - also add tests of field removals nits: - whitespace cleanup in `ApiListingGenerator` and `ApiListingComparerTests` - remove unused `additionalFilters` parameter from `ApiListingComparerTests.CreateApiListingDocument()`
@dougbu, |
var comparer = new ApiListingComparer(v1ApiListing, v2ApiListing); | ||
|
||
// Oops. The NewInternalProperty addition is a breaking change; makes it impossible to subclass type in | ||
// another assembly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Eilon these "oops" comments are about corner cases. Worth filing bugs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I don't understand the comment in the code. What is "oops" about it? And what is the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API check doesn't complain when an internal abstract
member is added though that is a significant breaking change -- prevents creation of a subclass outside the defining assembly. As I said, it's a corner case but "oops", something is slipping though…
typeToCheck, | ||
"public const System.Int32 ConstToMakeField = 2", | ||
ChangeKind.Removal), | ||
// Oops. Making a field writable is not technically a breaking change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the oops here is that API Check is disallowing a non-breaking change to a field. This one is also a corner case and it's also easy to work around (with entries in the breaking change files).
- see PR aspnet/BuildTools#259 and issue aspnet/BuildTools#146 - relates to 014a786
- see PR aspnet/BuildTools#259 and issue aspnet/BuildTools#146 - relates to 014a786
- see PR aspnet/BuildTools#259 and issue aspnet/BuildTools#146 - relates to 014a786
- see PR aspnet/BuildTools#259 and issue aspnet/BuildTools#146 - relates to 014a786
- see PR aspnet/BuildTools#259 and issue aspnet/BuildTools#146 - relates to 014a786
abstract
additions topublic
classes #146nits:
ApiListingGenerator
andApiListingComparerTests
additionalFilters
parameter fromApiListingComparerTests.CreateApiListingDocument()