From e2d6dac04aae4b355ea5af0c2dea494461f752e0 Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Tue, 28 Jul 2026 23:38:40 +0100 Subject: [PATCH] Core: upgrade FCS to v43.12.204 Update to the latest version Picks up the breaking API change from https://github.com/dotnet/fsharp/pull/19298 to make BasicQualifiedName an option instead of throwing when there is no value --- Directory.Packages.props | 4 ++-- src/FSharpLint.Core/Rules/NamingHelper.fs | 22 ++++++++-------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index b58b86286..579d6bfee 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,9 +8,9 @@ - + - + diff --git a/src/FSharpLint.Core/Rules/NamingHelper.fs b/src/FSharpLint.Core/Rules/NamingHelper.fs index 0c60915fc..34b80706c 100644 --- a/src/FSharpLint.Core/Rules/NamingHelper.fs +++ b/src/FSharpLint.Core/Rules/NamingHelper.fs @@ -499,17 +499,11 @@ module Asynchronous = | _ -> ReturnsNonAsync let (|FSharpTypeAsync|FSharpTypeTask|FSharpTypeTaskNonGeneric|FSharpTypeNonAsync|) (fSharpType: FSharpType) = - try - // BasicQualifiedName may throw InvalidOperationException for some types - // e.g. arrays, but not for Async<'T> or Task<'T>, so assume non-async type. - match fSharpType.BasicQualifiedName with - | "Microsoft.FSharp.Control.FSharpAsync`1" -> FSharpTypeAsync - | name when name.StartsWith "System.Threading.Tasks.Task" -> - if fSharpType.GenericArguments.Count > 0 then - FSharpTypeTask - else - FSharpTypeTaskNonGeneric - | _ -> FSharpTypeNonAsync - with - | :? InvalidOperationException -> - FSharpTypeNonAsync + match fSharpType.BasicQualifiedName with + | Some "Microsoft.FSharp.Control.FSharpAsync`1" -> FSharpTypeAsync + | Some name when name.StartsWith "System.Threading.Tasks.Task" -> + if fSharpType.GenericArguments.Count > 0 then + FSharpTypeTask + else + FSharpTypeTaskNonGeneric + | _ -> FSharpTypeNonAsync