Skip to content

Commit 4eff254

Browse files
authored
[NRBF] Remove [Experimental] (#113021)
* Revert "Mark the System.Formats.Nrbf assembly as [Experimental] with SYSLIB5005 (#107905)" This reverts commit b08181b. # Conflicts: # docs/project/list-of-diagnostics.md # src/libraries/Common/src/System/Experimentals.cs # src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj * this should stay
1 parent 850c0ab commit 4eff254

File tree

10 files changed

+3
-40
lines changed

10 files changed

+3
-40
lines changed

src/libraries/Common/src/System/Experimentals.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ internal static class Experimentals
2828
// X86Base.DivRem is experimental since performance is not as optimized as T.DivRem
2929
internal const string X86BaseDivRemDiagId = "SYSLIB5004";
3030

31-
// System.Formats.Nrbf is experimental
32-
internal const string NrbfDecoderDiagId = "SYSLIB5005";
31+
// System.Formats.Nrbf was experimental, do not reuse "SYSLIB5005"
3332

3433
// When adding a new diagnostic ID, add it to the table in docs\project\list-of-diagnostics.md as well.
3534
// Keep new const identifiers above this comment.

src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.Experimental.cs

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Metadata\ref\System.Reflection.Metadata.csproj" />
1414
</ItemGroup>
1515

16-
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
17-
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\ExperimentalAttribute.cs"
18-
Link="Common\ExperimentalAttribute.cs" />
19-
</ItemGroup>
20-
2116
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
2217
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresDynamicCodeAttribute.cs" />
2318
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />

src/libraries/System.Formats.Nrbf/src/AssemblyInfo.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/libraries/System.Formats.Nrbf/src/PACKAGE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
You can think of [NrbfDecoder](https://learn.microsoft.com/en-us/dotnet/api/system.formats.nrbf.nrbfdecoder) as being the equivalent of using a JSON/XML reader without the deserializer.
88

9-
**Note:** The 9.0.0 release of the `System.Formats.Nrbf` package is marked `[Experimental]` as the API shape is subject to change in the next major release. Even with the experimental annotation, the package is officially supported. Using the APIs from this package will produce a build warning with diagnostic ID `SYSLIB5005`. The diagnostic can be suppressed with the acknowledgement that the API shape is subject to change in the next major release.
10-
119
## How to Use
1210

1311
The NRBF payload consists of serialization records that represent the serialized objects and their metadata. To read the whole payload and get the root record, you need to call one of the [NrbfDecoder.Decode](https://learn.microsoft.com/dotnet/api/system.formats.nrbf.nrbfdecoder.decode) methods.

src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212
should be removed in order to re-enable validation. -->
1313
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
1414
</PropertyGroup>
15-
<ItemGroup>
16-
<Compile Include="$(CommonPath)System\Experimentals.cs"
17-
Link="Common\Experimentals.cs" />
18-
</ItemGroup>
19-
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
20-
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\ExperimentalAttribute.cs"
21-
Link="Common\ExperimentalAttribute.cs" />
22-
</ItemGroup>
2315
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
2416
<ProjectReference Include="$(LibrariesProjectRoot)\System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
2517
</ItemGroup>

src/libraries/System.Formats.Nrbf/tests/System.Formats.Nrbf.Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
55
<EnableDefaultItems>true</EnableDefaultItems>
6-
<!-- SYSLIB5005: System.Formats.Nrbf is experimental -->
7-
<NoWarn>$(NoWarn);SYSLIB5005</NoWarn>
86
</PropertyGroup>
97

108
<ItemGroup>

src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/ExperimentalAttribute.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ namespace System.Diagnostics.CodeAnalysis
2222
AttributeTargets.Event |
2323
AttributeTargets.Interface |
2424
AttributeTargets.Delegate, Inherited = false)]
25-
#if SYSTEM_PRIVATE_CORELIB
26-
public
27-
#else
28-
internal
29-
#endif
30-
sealed class ExperimentalAttribute : Attribute
25+
public sealed class ExperimentalAttribute : Attribute
3126
{
3227
/// <summary>
3328
/// Initializes a new instance of the <see cref="ExperimentalAttribute"/> class, specifying the ID that the compiler will use

src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ System.Resources.Extensions.DeserializingResourceReader
1616
System.Resources.Extensions.PreserializedResourceWriter</PackageDescription>
1717
<!-- TODO: Add package README file: https://github.com/dotnet/runtime/issues/99358 -->
1818
<EnableDefaultPackageReadmeFile>false</EnableDefaultPackageReadmeFile>
19-
<!-- SYSLIB5005: System.Formats.Nrbf is experimental -->
20-
<NoWarn>$(NoWarn);SYSLIB5005</NoWarn>
2119
</PropertyGroup>
2220

2321
<ItemGroup>

src/libraries/System.Resources.Extensions/tests/BinaryFormatTests/System.Resources.Extensions.BinaryFormat.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
SYSLIB0011: BinaryFormatter obsolete
1212
SYSLIB0050: Obsolete attribute
1313
SYSLIB0051: Formatters obsolete
14-
SYSLIB5005: System.Formats.Nrbf experimental
1514
-->
16-
<NoWarn>$(NoWarn);CS1574;CS1580;CA1036;CA1051;CA1066;SYSLIB0011;SYSLIB0050;SYSLIB0051;SYSLIB5005;xUnit1013;CS0649</NoWarn>
15+
<NoWarn>$(NoWarn);CS1574;CS1580;CA1036;CA1051;CA1066;SYSLIB0011;SYSLIB0050;SYSLIB0051;xUnit1013;CS0649</NoWarn>
1716
<StringResourcesPath>$(LibrariesProjectRoot)\System.Resources.Extensions\src\Resources\Strings.resx</StringResourcesPath>
1817
</PropertyGroup>
1918

0 commit comments

Comments
 (0)