From e5a7b9e53e503ba473e70b91a4b364ade80d75a2 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Tue, 25 Aug 2026 15:26:08 +0100 Subject: [PATCH] Obsolete the never-implemented type-handler pair as a warning, not an error Both types have always been no-ops, so nothing depends on their behaviour - but code that names them does compile today, and an error breaks that build on upgrade. A warning still says what to use instead, and gives people a release to move at their own pace before it hardens. --- src/Dapper.AOT/TypeHandlerT.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dapper.AOT/TypeHandlerT.cs b/src/Dapper.AOT/TypeHandlerT.cs index b75d9a79..206c2f84 100644 --- a/src/Dapper.AOT/TypeHandlerT.cs +++ b/src/Dapper.AOT/TypeHandlerT.cs @@ -11,7 +11,7 @@ namespace Dapper; /// [ImmutableObject(true)] [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method, AllowMultiple = true)] -[Obsolete("This registration was never implemented: nothing in the analyzer or generator has ever read it, so it has always been a no-op. Use the non-generic [TypeHandler(typeof(TValue), typeof(THandler))] with a handler implementing IDbValueHandler.", error: true)] +[Obsolete("This registration was never implemented: nothing in the analyzer or generator has ever read it, so it has always been a no-op. Use the non-generic [TypeHandler(typeof(TValue), typeof(THandler))] with a handler implementing IDbValueHandler.", error: false)] public sealed class TypeHandlerAttribute : Attribute where TTypeHandler : TypeHandler, new() {} @@ -19,7 +19,7 @@ public sealed class TypeHandlerAttribute : Attribute /// /// Process a parameter value of type /// -[Obsolete("This handler shape was never implemented: it exists only as the constraint of the obsolete generic [TypeHandler<,>] attribute, which was never read. Use IDbValueHandler (or the DbValueHandler base class), registered with [TypeHandler(typeof(T), typeof(THandler))].", error: true)] +[Obsolete("This handler shape was never implemented: it exists only as the constraint of the obsolete generic [TypeHandler<,>] attribute, which was never read. Use IDbValueHandler (or the DbValueHandler base class), registered with [TypeHandler(typeof(T), typeof(THandler))].", error: false)] public abstract class TypeHandler { ///