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

Mark the System.Formats.Nrbf assembly as [Experimental] with SYSLIB5005 #107905

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

jeffhandley
Copy link
Member

@jeffhandley jeffhandley commented Sep 17, 2024

This marks the entire assembly for System.Formats.Nrbf as [Experimental], claiming the diagnostic ID of SYSLIB5005 for it as the API shape is subject to change in .NET 10.

Because the package has down-level targets, we include an internal copy of ExperimentalAttribute for versions earlier than .NET 8 when the attribute was introduced. VS 17.11 respects the internal attribute and provides the same experience for showing the diagnostic, even when targeting .NET Framework and using the package.

While making this change, I noticed the <EnableDefaultPackageReadmeFile> property was still set to false and the PACKAGE.md file was therefore not being used in the NuGet package. That has been corrected.

Before we merge this PR, we will merge PRs for dotnet/winforms and dotnet/wpf to suppress the SYSLIB5005 diagnostic where these APIs are referenced. We plan to backport this change to release/9.0 and release/9.0-rc2.

This comment was marked as resolved.

@dotnet-issue-labeler dotnet-issue-labeler bot added needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners new-api-needs-documentation labels Sep 17, 2024
@jeffhandley jeffhandley added binaryformatter-migration Issues related to the removal of BinaryFormatter and migrations away from it and removed new-api-needs-documentation needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 17, 2024

This comment was marked as resolved.

Copy link
Contributor

Tagging subscribers to 'binaryformatter-migration': @adamsitnik, @bartonjs, @jeffhandley, @terrajobst

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

[assembly: System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5005", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, we don't have any kind of description on experimental that provides more detail in the diagnostic. I thought we did. Should we look at adding that? Someone can go to the docs, but it'd be nice if the message here could say that it's fully supported but the shape might 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.

I thought we did too until I did one of the earlier experimentals. But yeah, that API doesn't have a message attribute; it always uses a message from Roslyn. I'll submit an API suggestion to add it.

@jeffhandley jeffhandley merged commit b08181b into dotnet:main Sep 17, 2024
145 of 149 checks passed
@jeffhandley
Copy link
Member Author

/backport to release/9.0-rc2

@jeffhandley jeffhandley deleted the jeffhandley/nrbf-experimental branch September 17, 2024 21:02
Copy link
Contributor

Started backporting to release/9.0-rc2: https://github.com/dotnet/runtime/actions/runs/10911050092

@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Formats.Nrbf binaryformatter-migration Issues related to the removal of BinaryFormatter and migrations away from it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants