From 10650a554bdab6378423498a44b0f0a710fad1ae Mon Sep 17 00:00:00 2001 From: mgravell Date: Fri, 18 Sep 2026 04:39:06 +0100 Subject: [PATCH] Retire SER001: vector sets are not experimental any more The diagnostic was already dead - no constant in Experiments.cs, no [Experimental] applying it anywhere, and none of the 94 public API entries for vector sets gated by it - but it was still suppressed in NoWarn and its docs page still described the feature in the present tense as subject to change. Dropped from NoWarn. The build is the check that this is safe: nothing emits SER001, so removing the suppression changes no diagnostics, and a clean build with RunAnalyzers=true across every target framework says so. The docs page stays, because the diagnostic's help URL points at it and older builds still emit it - rewritten in the past tense, saying plainly that it is no longer produced and that an existing suppression is now inert and can go whenever convenient. What it used to mean is kept below that, since somebody arriving from an old build's warning still needs it. Also added to the reserved-IDs list in Experiments.cs, alongside SER002/3/6. That list is what stops a number being recycled, and a recycled SER001 would be silently suppressed by every stale NoWarn still carrying it - which is the one failure mode the convention exists to prevent. --- Directory.Build.props | 6 +++--- docs/exp/SER001.md | 31 +++++++++++++++++++++++-------- src/RESPite/Shared/Experiments.cs | 3 ++- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6cd0c9477d..47caaf1b5e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,9 +10,9 @@ true $(MSBuildThisFileDirectory)Shared.ruleset NETSDK1069 - - $(NoWarn);NU5105;NU1507;SER001;SER004;SER005;SER009 + + $(NoWarn);NU5105;NU1507;SER004;SER005;SER009 https://github.com/StackExchange/StackExchange.Redis/releases https://seredis.dev/ MIT diff --git a/docs/exp/SER001.md b/docs/exp/SER001.md index 2def8be6ee..565a2278c0 100644 --- a/docs/exp/SER001.md +++ b/docs/exp/SER001.md @@ -1,15 +1,25 @@ -At the current time, [Redis documents that](https://redis.io/docs/latest/commands/vadd/): +# SER001 — retired + +**This diagnostic is no longer produced.** Vector set support in current library versions is not marked +experimental, so nothing emits `SER001` and no suppression is needed. The page is kept because the +diagnostic's help link pointed here, and older builds still carry it. + +If you have a suppression for `SER001` — in a `csproj`, a `.editorconfig`, or a `#pragma` — it is now +inert, and can be removed whenever it suits you. + +## What it used to mean + +At the time, [Redis documented that](https://redis.io/docs/latest/commands/vadd/): > Vector set is a new data type that is currently in preview and may be subject to change. -As such, the corresponding library feature must also be considered subject to change: +The corresponding library feature therefore had to be considered subject to change too: -1. Existing bindings may cease working correctly if the underlying server API changes. -2. Changes to the server API may require changes to the library API, manifesting in either/both of build-time - or run-time breaks. +1. Existing bindings might cease working correctly if the underlying server API changed. +2. Changes to the server API might require changes to the library API, manifesting in either/both of + build-time or run-time breaks. -While this seems *unlikely*, it must be considered a possibility. If you acknowledge this, you can suppress -this warning by adding the following to your `csproj` file: +Acknowledging that was what the suppression meant: ```xml $(NoWarn);SER001 @@ -19,4 +29,9 @@ or more granularly / locally in C#: ``` c# #pragma warning disable SER001 -``` \ No newline at end of file +``` + +## Reserved, not recycled + +`SER001` is not reused for anything else, so an old suppression cannot silently hide an unrelated +warning. The same applies to the other retired identifiers — see `Experiments.cs`. diff --git a/src/RESPite/Shared/Experiments.cs b/src/RESPite/Shared/Experiments.cs index 61a1e5fe87..22dd8437f5 100644 --- a/src/RESPite/Shared/Experiments.cs +++ b/src/RESPite/Shared/Experiments.cs @@ -8,9 +8,10 @@ internal static class Experiments // note: {0} is substituted with the DiagnosticId by the analyzer, e.g. .../exp/SER002 public const string UrlFormat = "https://seredis.dev/exp/{0}"; - // Retired experiments: these server features are now stable and no longer gated. + // Retired experiments: these features are now stable and no longer gated. // The DiagnosticIds remain reserved (do NOT reuse them) so old callers' suppressions // and the /docs/exp pages stay meaningful: + // SER001 = vector sets // SER002 = Server_8_4 (Redis 8.4 features) // SER003 = Server_8_6 (Redis 8.6 features) // SER006 = Server_8_8 (Redis 8.8 features)