Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixed
* Fix tooltip not being interactive: moving the mouse from a code token into its tooltip now keeps the tooltip open, allowing users to select and copy the tooltip text. [#949](https://github.com/fsprojects/FSharp.Formatting/issues/949)
* The compiler-generated `IsCase` union case tester properties are no longer listed as members of a union type, and `FsDocsWarnOnMissingDocs` no longer reports `FD0001` for them: they cannot carry XML documentation. [#1313](https://github.com/fsprojects/FSharp.Formatting/issues/1313)
* `fsdocs watch` rebuilds a page when a file its script depends on changes, following `#load` transitively and `#r` to local files, wherever those files are (a dot folder, outside the input folder). The directives are read from the syntax tree, so a `#load` in a comment does not count. [#1309](https://github.com/fsprojects/FSharp.Formatting/issues/1309)

## [23.0.0-alpha.1] - 2026-09-08
Expand Down
14 changes: 10 additions & 4 deletions src/FSharp.Formatting.ApiDocs/SymbolReader.fs
Original file line number Diff line number Diff line change
Expand Up @@ -836,13 +836,19 @@ module internal SymbolReader =
ctx.WarnOnMissingDocs
))

/// Members the compiler synthesizes for the user: compiler-generated members and the
/// <c>IsCase</c> union case tester properties. They cannot carry XML documentation, so they
/// are neither documented nor reported as missing documentation.
let isSynthesizedMember (v: FSharpMemberOrFunctionOrValue) =
v.IsCompilerGenerated || v.IsUnionCaseTester

/// Reads all members in a sequence without filtering out any by kind.
let readAllMembers ctx entityUrl kind (members: FSharpMemberOrFunctionOrValue seq) =
members
|> Seq.choose (fun v ->
if
checkAccess ctx v.Accessibility
&& not v.IsCompilerGenerated
&& not (isSynthesizedMember v)
&& not v.IsPropertyGetterMethod
&& not v.IsPropertySetterMethod
&& not v.IsEventAddMethod
Expand All @@ -858,7 +864,7 @@ module internal SymbolReader =
let readMembers ctx entityUrl kind (entity: FSharpEntity) cond =
entity.MembersFunctionsAndValues
|> Seq.choose (fun v ->
if checkAccess ctx v.Accessibility && not v.IsCompilerGenerated && cond v then
if checkAccess ctx v.Accessibility && not (isSynthesizedMember v) && cond v then
tryReadMember ctx entityUrl kind v
else
None)
Expand Down Expand Up @@ -1053,7 +1059,7 @@ module internal SymbolReader =
bdef.MembersFunctionsAndValues
|> Seq.filter (fun v ->
checkAccess ctx v.Accessibility
&& not v.IsCompilerGenerated
&& not (isSynthesizedMember v)
&& not v.IsOverrideOrExplicitInterfaceImplementation
&& not v.IsEventAddMethod
&& not v.IsEventRemoveMethod
Expand Down Expand Up @@ -1088,7 +1094,7 @@ module internal SymbolReader =
getMembers typ
|> Seq.filter (fun v ->
checkAccess ctx v.Accessibility
&& not v.IsCompilerGenerated
&& not (isSynthesizedMember v)
&& not v.IsOverrideOrExplicitInterfaceImplementation
&& not v.IsEventAddMethod
&& not v.IsEventRemoveMethod
Expand Down
4 changes: 4 additions & 0 deletions tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ let ``ApiDocs works on two sample F# assemblies`` (format: OutputFormat) =
files.[(sprintf "fslib-union.%s" format.Extension)]
|> shouldContainText "Hello of int"

// The compiler-generated `IsCase` union case testers are not documented (#1313)
files.[(sprintf "fslib-union.%s" format.Extension)]
|> shouldNotContainText "IsHello"

files.[(sprintf "fslib.%s" format.Extension)]
|> shouldContainText "Sample class"

Expand Down
Loading