Skip to content

Commit 3592796

Browse files
authored
Merge pull request #966 from TheAngryByrd/update-fcs-43-10-100
Update FSharp.Compiler.Service to 43.10.100
2 parents c1651fe + 5ed3222 commit 3592796

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77
<ItemGroup>
88
<!-- locking the version of F# Core as FCS does this anyway and in practise all will be using the same version -->
9-
<PackageVersion Include="FSharp.Core" Version="[9.0.100]" />
10-
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.9.100]" />
9+
<PackageVersion Include="FSharp.Core" Version="[10.0.100]" />
10+
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.10.100]" />
1111
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
1212
<PackageVersion Include="Microsoft.Build" Version="" PrivateAssets="all" />
1313
<PackageVersion Include="Microsoft.Build.Framework" Version="" PrivateAssets="all" />

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Changed
6+
* Update FCS to 43.10.100. [#935](https://github.com/fsprojects/FSharp.Formatting/pull/966)
7+
38
## 21.0.0 - 2025-11-12
49

510
Stable release

src/FSharp.Formatting.ApiDocs/GenerateModel.fs

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,12 +1385,12 @@ module internal SymbolReader =
13851385

13861386
let readMemberOrVal (ctx: ReadingContext) (v: FSharpMemberOrFunctionOrValue) =
13871387
let requireQualifiedAccess =
1388-
hasAttrib<RequireQualifiedAccessAttribute> v.ApparentEnclosingEntity.Attributes
1389-
// Hack for FSHarp.Core - `Option` module doesn't have RQA but really should have
1390-
|| (v.ApparentEnclosingEntity.Namespace = Some "Microsoft.FSharp.Core"
1391-
&& v.ApparentEnclosingEntity.DisplayName = "Option")
1392-
|| (v.ApparentEnclosingEntity.Namespace = Some "Microsoft.FSharp.Core"
1393-
&& v.ApparentEnclosingEntity.DisplayName = "ValueOption")
1388+
v.ApparentEnclosingEntity
1389+
|> Option.exists (fun aee ->
1390+
hasAttrib<RequireQualifiedAccessAttribute> aee.Attributes
1391+
// Hack for FSHarp.Core - `Option` module doesn't have RQA but really should have
1392+
|| (aee.Namespace = Some "Microsoft.FSharp.Core" && aee.DisplayName = "Option")
1393+
|| (aee.Namespace = Some "Microsoft.FSharp.Core" && aee.DisplayName = "ValueOption"))
13941394

13951395
let customOpName =
13961396
match tryFindAttrib<CustomOperationAttribute> v.Attributes with
@@ -1406,7 +1406,8 @@ module internal SymbolReader =
14061406
// This module doesn't have RequireQualifiedAccessAttribute and anyway we want the name to show
14071407
// usage of its members as Array.Parallel.map
14081408
let specialCase1 =
1409-
v.ApparentEnclosingEntity.TryFullName = Some "Microsoft.FSharp.Collections.ArrayModule.Parallel"
1409+
v.ApparentEnclosingEntity
1410+
|> Option.exists (fun aee -> aee.TryFullName = Some "Microsoft.FSharp.Collections.ArrayModule.Parallel")
14101411

14111412
let argInfos, retInfo = FSharpType.Prettify(v.CurriedParameterGroups, v.ReturnParameter)
14121413

@@ -1439,7 +1440,13 @@ module internal SymbolReader =
14391440

14401441
match v.IsMember, v.IsInstanceMember, v.LogicalName, v.DisplayName, customOpName with
14411442
// Constructors
1442-
| _, _, ".ctor", _, _ -> span [] [ !!v.ApparentEnclosingEntity.DisplayName; fullArgUsage ]
1443+
| _, _, ".ctor", _, _ ->
1444+
span
1445+
[]
1446+
[ match v.ApparentEnclosingEntity with
1447+
| None -> ()
1448+
| Some aee -> !!aee.DisplayName
1449+
fullArgUsage ]
14431450

14441451
// Indexers
14451452
| _, true, _, "Item", _ -> span [] [ !! "this["; fullArgUsage; !! "]" ]
@@ -1515,7 +1522,9 @@ module internal SymbolReader =
15151522
| _, false, _, name, _ ->
15161523
span
15171524
[]
1518-
[ !!(v.ApparentEnclosingEntity.DisplayName + "." + name)
1525+
[ match v.ApparentEnclosingEntity with
1526+
| None -> !!name
1527+
| Some aee -> !!(aee.DisplayName + "." + name)
15191528
if preferNoParens then
15201529
!! "&#32;"
15211530
fullArgUsage ]
@@ -1552,7 +1561,7 @@ module internal SymbolReader =
15521561
// Hence getting the generic argument count if this is a little trickier
15531562
let numGenericParamsOfApparentParent =
15541563
let pty = v.ApparentEnclosingEntity
1555-
pty.GenericParameters.Count
1564+
pty |> Option.map _.GenericParameters.Count |> Option.defaultValue 0
15561565

15571566
// Ensure that there is enough number of elements to skip
15581567
let tps =
@@ -1586,10 +1595,9 @@ module internal SymbolReader =
15861595
let extendedType =
15871596
if v.IsExtensionMember then
15881597
try
1589-
Some(
1590-
v.ApparentEnclosingEntity,
1591-
formatTyconRefAsHtml ctx.UrlMap v.ApparentEnclosingEntity |> codeHtml
1592-
)
1598+
match v.ApparentEnclosingEntity with
1599+
| Some aee -> Some(aee, formatTyconRefAsHtml ctx.UrlMap aee |> codeHtml)
1600+
| None -> None
15931601
with _ ->
15941602
None
15951603
else

0 commit comments

Comments
 (0)