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

Disallow new abstract type members #259

Closed
wants to merge 1 commit into from
Closed

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented May 19, 2017

nits:

  • whitespace cleanup in ApiListingGenerator and ApiListingComparerTests
  • remove unused additionalFilters parameter from ApiListingComparerTests.CreateApiListingDocument()

- #146
- also add tests of field removals

nits:
- whitespace cleanup in `ApiListingGenerator` and `ApiListingComparerTests`
- remove unused `additionalFilters` parameter from `ApiListingComparerTests.CreateApiListingDocument()`
@dnfclas
Copy link

dnfclas commented May 19, 2017

@dougbu,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

var comparer = new ApiListingComparer(v1ApiListing, v2ApiListing);

// Oops. The NewInternalProperty addition is a breaking change; makes it impossible to subclass type in
// another assembly.
Copy link
Member Author

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?

Copy link
Member

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?

Copy link
Member Author

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.
Copy link
Member Author

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).

dougbu added a commit to aspnet/HttpAbstractions that referenced this pull request May 24, 2017
dougbu added a commit to aspnet/HttpAbstractions that referenced this pull request May 24, 2017
dougbu added a commit to dotnet/efcore that referenced this pull request May 25, 2017
dougbu added a commit to aspnet/Mvc that referenced this pull request May 25, 2017
dougbu added a commit to dotnet/efcore that referenced this pull request May 25, 2017
dougbu added a commit to aspnet/Mvc that referenced this pull request May 25, 2017
dougbu added a commit to aspnet/Mvc that referenced this pull request May 25, 2017
dougbu added a commit to dotnet/efcore that referenced this pull request May 25, 2017
dougbu added a commit to aspnet/HttpAbstractions that referenced this pull request May 26, 2017
dougbu added a commit to aspnet/Mvc that referenced this pull request May 26, 2017
dougbu added a commit to aspnet/HttpAbstractions that referenced this pull request May 26, 2017
dougbu added a commit to dotnet/efcore that referenced this pull request May 26, 2017
dougbu added a commit to aspnet/Mvc that referenced this pull request May 26, 2017
@dougbu
Copy link
Member Author

dougbu commented May 26, 2017

3596a1f

@dougbu dougbu closed this May 26, 2017
@dougbu dougbu deleted the dougbu/abstract.checks.146 branch May 26, 2017 16:57
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.

4 participants