Clarify breaking-change rules for properties

Open
#112,368 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Start with docs/coding-guidelines/breaking-change-rules.md#members and the Microsoft.DotNet.PackageValidation tool under src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation. Compare how properties, events, and indexers are treated against the documented rules. Done means the documentation and validation behavior have a definitive, consistent answer.

Written by the indexing model from the issue text.

Description

area-Infrastructure-libraries

Would moving a public property up to a base class be considered a breaking change, in any sense?

The breaking-change-rules doc mentions that moving methods up is allowed. It seems like moving properties should be allowed too. But the Microsoft.DotNet.PackageValidation tool flags this as a breaking change.

And while we're at it, how about public events and indexers?

It would be good to get a definitive answer, and to have the doc and the validation tool in sync as well.

@jnm2 @stephentoub

Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.