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

[Breaking change]: JSON source-gen API refactoring causes binary-compat breaking change #26200

Closed
1 of 2 tasks
layomia opened this issue Sep 20, 2021 · 0 comments · Fixed by #26222
Closed
1 of 2 tasks
Assignees
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3

Comments

@layomia
Copy link
Contributor

layomia commented Sep 20, 2021

Description

In dotnet/runtime#59243, we updated the APIs that the output of the JSON source generator calls to make them easier to extend with new features in the future. This will result in projects that explicitly use the JSON source generator and were compiled with .NET RC 1 or earlier to fail with runtime exceptions when run on the .NET RC 2 runtime.

Version

.NET 6 RC2

Previous behavior

Projects that were compiled using the RC1 version of the STJ source generator & library run as expected.

New behavior

Projects that were compiled using the RC1 version of the STJ source generator & library fail when run against the RC 2 runtime. Projects that are recompiled with the RC 2 SDK work as expected.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
  • 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.

Reason for change

To make the source-generator implementation easier to extend with features in the future. More background here: dotnet/runtime#59243 (comment).

Recommended action

Recompile your applications using the RC 2 SDK.

Feature area

Core .NET libraries

Affected APIs

Usage of

@layomia layomia added doc-idea Indicates issues that are suggestions for new topics [org][type][category] breaking-change Indicates a .NET Core breaking change Pri1 High priority, do before Pri2 and Pri3 labels Sep 20, 2021
@dotnet-bot dotnet-bot added ⌚ Not Triaged Not triaged 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release binary incompatible Existing binaries may encounter a breaking change in behavior. labels Sep 20, 2021
@gewarren gewarren removed the ⌚ Not Triaged Not triaged label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants