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

Why is this change binary compatible and not source compatible? #44434

Open
WizardBrony opened this issue Jan 18, 2025 · 3 comments
Open

Why is this change binary compatible and not source compatible? #44434

WizardBrony opened this issue Jan 18, 2025 · 3 comments
Assignees
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. waiting-on-feedback Waiting for feedback from SMEs before they can be merged

Comments

@WizardBrony
Copy link

WizardBrony commented Jan 18, 2025

Type of issue

Other (describe below)

Description

This question is just one example where I am confused by the compatibility indictors for the listed .NET breaking changes. If I understand the change correctly, nothing changed with the ObjectResult.StatusCode API itself, so everything will compile the same, but the run-time behavior in this scenario (returning a T in a controller action that declares the return type ActionResult) changed. Doesn't that mean this change is binary incompatible and source compatible according to the documentation's definition?

  • Binary compatible - Existing binaries will load and execute successfully without recompilation, and the run-time behavior won't change.
  • Source compatible - Source code will compile successfully without changes when targeting the new runtime or using the new SDK or component.

Page URL

https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/6.0/actionresult-statuscode

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/compatibility/aspnet-core/6.0/actionresult-statuscode.md

Document Version Independent Id

64b65b92-b86a-1741-2a38-c1119b7d2ed1

Article author

@CamSoper

Metadata

  • ID: 204588be-f452-4db7-db93-ed4ea5af6cd0
  • Service: dotnet-fundamentals

Related Issues

@CamSoper
Copy link
Contributor

Thanks, @WizardBrony!

It certainly looks to me that you're correct--This seems to be classified wrong. I think the correct classification would be behavioral change.

This change was announced prior to me taking over maintenance of the breaking changes docs, so I'd like to ask around a little to make sure I'm not missing something before I update the doc.

CC: @gewarren

@CamSoper CamSoper added waiting-on-feedback Waiting for feedback from SMEs before they can be merged and removed ⌚ Not Triaged Not triaged labels Jan 24, 2025
@CamSoper CamSoper self-assigned this Jan 24, 2025
@CamSoper CamSoper added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Jan 24, 2025
@gewarren
Copy link
Contributor

Back when this breaking change was documented, we used different categories and definitions. The definitions were overhauled for .NET 7 and the new "behavioral change" category was introduced in the breaking change issue template at that time. So this particular breaking change is "correct" and consistent for .NET 6, but not .NET 7+. Sorry for the confusion.

.NET 6 definition of source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.

.NET 7+ definition: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.

@WizardBrony
Copy link
Author

Ahh, that makes sense. Then what I think needs to be updated are the definitions at the top of the “Breaking changes” summary pages so that they match the template definitions as they were written at that version of .NET.

Breaking changes in .NET 6
Breaking changes in .NET 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. waiting-on-feedback Waiting for feedback from SMEs before they can be merged
Projects
None yet
Development

No branches or pull requests

3 participants