Conversation
Add MSDN-style 'Inherited members' section to API doc type pages. Members from base types that are registered in the same docs set are collected and rendered grouped by declaring base type (with a link), below the type's own members. - CrossReferenceResolver: add TryResolveUrlBaseNameForEntity - ApiDocEntity: add InheritedMembers property - SymbolReader.readType: collect getInheritedMemberGroups, walking the base-type chain and stopping at excluded/omitted or external bases - GenerateHtml/GenerateMarkdown: render 'Inherited from X' sections 415/415 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/repo-assist refactor code to adhere to analyze feedback |
Replace the two-step List.map/List.filter pipeline with List.choose in GenerateHtml.fs and GenerateMarkdown.fs to address CombinePipedModuleFunctionsAnalyzer warnings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
This comment has been minimized.
This comment has been minimized.
|
/repo-assist We need tests added, and could you generate HTML and markdown for a small example please, pasting the markdown in a reply here also update the docs and make it possible to opt out through a project setting |
- Add BaseClassForInheritance and DerivedClassForInheritance to FsLib2 test library - Add model test: InheritedMembers is populated for derived types - Add output tests: HTML and Markdown render 'Inherited from' sections - Update type count assertion from 11 to 13 for the two new types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
This comment has been minimized.
This comment has been minimized.
- Add ShowInheritedMembers field to ApiDocInput (default true) - Thread through ReadingContext and readAssembly - Gate getInheritedMemberGroups on ctx.ShowInheritedMembers - Add FsDocsNoInheritedMembers MSBuild property to ProjectCracker - Wire through BuildCommand tuple (11-element) - Add two test cases: model-level and output-level opt-out - Update docs/commandline.md with new project setting - Update RELEASE_NOTES.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 This is an automated response from Repo Assist. Done! Here's what I added in the latest push: Changes1. Tests (2 new)
All 76 existing tests continue to pass. 2. Opt-out via project settingAdd to your (FsDocsNoInheritedMembers)true(/FsDocsNoInheritedMembers)This sets The 3. Docs updated
4. Sample markdown outputHere is the generated Markdown for ## DerivedClassForInheritance Type
Namespace: [FsLib](/reference/fslib)
Assembly: FsLib2.dll
Base Type: `BaseClassForInheritance`
Derived class that inherits documented members from BaseClassForInheritance (issue #590)
### Constructors
#### `DerivedClassForInheritance()`
Returns: `DerivedClassForInheritance`
### Instance members
#### `this.DerivedMethod`
A method on the derived class
Returns: `int`
### Inherited members
#### Inherited from `BaseClassForInheritance`
### Instance members
#### `this.BaseMethod`
A documented instance method on the base class
Returns: `int`
### Static members
#### `BaseClassForInheritance.BaseStaticMethod()`
A documented static method on the base class
Returns: `string`And the corresponding HTML fragment (simplified): <h3>Inherited members</h3>
<h4>Inherited from <code>(a href="https://github.com/reference/fslib-baseclassforinheritance.html")BaseClassForInheritance(/a)</code></h4>
<h3>Instance members</h3>
<table class="table outer-list fsdocs-member-list">
<tr>
<td class="fsdocs-member-usage"><code>this.BaseMethod</code></td>
<td class="fsdocs-member-xmldoc">A documented instance method on the base class</td>
</tr>
</table>
<h3>Static members</h3>
<table class="table outer-list fsdocs-member-list">
<tr>
<td class="fsdocs-member-usage"><code>BaseClassForInheritance.BaseStaticMethod()</code></td>
<td class="fsdocs-member-xmldoc">A documented static method on the base class</td>
</tr>
</table>
|
🤖 This is an automated PR from Repo Assist.
Closes #590
Summary
Implements MSDN-style "Inherited members" sections on API documentation type pages.
When a type inherits from a base class that is also part of the same documentation set (i.e., registered in the same
fsdocsrun), its instance and static members are now shown below the type's own members, grouped under a heading like:Members from external base types (e.g.
System.Object) are intentionally excluded to keep pages uncluttered.Root Cause
The
getMembershelper inSymbolReader.readTypealready walked the base type chain, but only folded in members from excluded/omitted bases. Members from visible (non-excluded) base types were silently dropped.Changes
CrossReferenceResolver.fsTryResolveUrlBaseNameForEntityto check if a type is registeredApiDocTypes.fsinheritedMembersconstructor param andInheritedMembersproperty toApiDocEntitySymbolReader.fsgetInheritedMemberGroupsthat walks the base-type chain collecting members from registered basesGenerateHtml.fsGenerateMarkdown.fsRELEASE_NOTES.mdBehaviour
formatTypeAsHtml/ URL-map machinery).Test Status
415/415 tests pass (
dotnet test FSharp.Formatting.sln --configuration Release). Build is clean with 0 errors.Trade-offs / Notes
InheritedMembersproperty is appended as the last constructor parameter; callers that don't constructApiDocEntitydirectly are unaffected.[(fsdocs: no-inherited-members)]opt-out annotation if needed.