Skip to content

[Breaking change]: Diagnostic ID changed for Obsoletion of GetCompressedStack/SetCompressedStack #25464

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

Closed
1 of 2 tasks
jeffhandley opened this issue Aug 4, 2021 · 0 comments · Fixed by #25662
Closed
1 of 2 tasks
Assignees
Labels
breaking-change Indicates a .NET Core breaking change 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release source incompatible Source code may encounter a breaking change in behavior when targeting the new version.

Comments

@jeffhandley
Copy link
Member

Description

The GetCompressedStack and SetCompressedStack APIs were previously marked as [Obsolete] with the default CS0618 diagnostic ID and a message providing guidance. In .NET 6, the [Obsolete] attribute has been updated to capture a more accurate message and to group this obsoletion with other Code Access Security obsoletions covered by the SYSLIB0003 diagnostic ID.

Introduced in dotnet/runtime#56874.

Version

.NET 6 RC1

Previous behavior

Referencing GetCompressedStack or SetCompressedStack would result in an obsoletion warning with the default diagnostic ID (CS0618 for C#).

New behavior

Referencing GetCompressedStack or SetCompressedStack will result in an obsoletion warning with the SYSLIB0003 diagnostic ID and an updated message. If CS0618 was previously being suppressed and SYSLIB0003 is not yet being suppressed, a new build warning will be produced.

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

The updated diagnostic ID and message more accurately reflects the current state of these APIs. The APIs are related to Code Access Security, which is deprecated in .NET Core / .NET 5+ and not supported.

Recommended action

Refer to the documentation for https://aka.ms/dotnet-warnings/SYSLIB0003, which is emitted by the new build warning, to determine the appropriate action.

Feature area

Core .NET libraries

Affected APIs

@jeffhandley jeffhandley added doc-idea breaking-change Indicates a .NET Core breaking change labels Aug 4, 2021
@dotnet-bot dotnet-bot added ⌚ Not Triaged Not triaged 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release source incompatible Source code may encounter a breaking change in behavior when targeting the new version. labels Aug 4, 2021
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a .NET Core breaking change 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release source incompatible Source code may encounter a breaking change in behavior when targeting the new version.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants