Skip to content

Fix DotNet output regressions reported against 0.5.8 and add regression tests - #58

Merged
Malcolmnixon merged 8 commits into
mainfrom
fix/plexus-reported-issues
Oct 15, 2026
Merged

Malcolmnixon merged 8 commits into
mainfrom
fix/plexus-reported-issues

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

Summary

Fixes the DotNet output regressions and gaps reported against ApiMark 0.5.8 (found while documenting Plexus), and adds regression tests so each fix is guarded by exact-output assertions.

Reported issues fixed

  • void? return types in nullable contexts; params modifier; virtual/override/abstract/sealed/new modifiers and a protected marker in overview rows
  • Inherited members ("Inherited from X" sections, including abstract and external bases)
  • Overview tables and overload headings keep defaults, reference-type ?, and C# tuple syntax
  • Overload index rows list distinct return types and a shared/neutral summary; generic overload examples stay under their own heading
  • Generic types: Foo<T> page titles, Type Parameters tables (types and methods), constraints
  • Private/internal setters no longer rendered
  • External <inheritdoc/> resolved from reference XML or treated as documented
  • Record primary constructor descriptions
  • Navigation: API Reference breadcrumb on every page, "Start here" and Key Types in api.md
  • External Types table uses C# names and escapes generics
  • Cross-package links: ApiMarkLinkVersion > PackageVersion > Version precedence with a mismatch warning; prose <see cref> and nested-type crefs link
  • <paramref>, <typeparamref> and <see langword> render as inline code; overload crefs link to the overload heading

File names

  • New ApiMark.Core.FileNameSanitizer guarantees legal, collision-free names across DotNet, C++ and VHDL (reserved Windows names, illegal characters, case twins, explicit generic-interface members); FileMarkdownWriterFactory rejects illegal segments.

Breaking changes

  • Generic type pages are renamed (Foo1.md->Foo-1.md`), and explicit-interface member pages and some colliding names change. Migration notes are in the user guide.

Validation

  • lint.ps1 clean; DotNet (net8/9/10), Core, MSBuild, Tool and VHDL tests pass.
  • C++ clang-dependent tests cannot run on the authoring machine (clang not installed). ClangHangs test timeout raised from 300 ms to 5000 ms (flaky under load; fails on the base commit too).
  • Code review: no issues. Formal review: one finding (sanitizer collision), fixed and tested.

Follow-up

  • A registry-based naming scheme (Foo{2}.md, -N fallback, documented rules) is planned as a separate PR.

Malcolm Nixon and others added 3 commits October 14, 2026 20:08
…regression tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…izing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 02:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One or more issues must be addressed before approval.

3 open findings
What changed in this PR

This PR fixes .NET documentation rendering, navigation, inheritance, generic naming, cross-assembly links, and MSBuild version expansion, while adding shared cross-platform filename sanitization and extensive regression coverage.

Changes:

  • Corrects .NET signatures, overloads, inheritance, generics, nullability, and XML documentation handling.
  • Adds deterministic filename sanitization and validation across .NET, C++, and VHDL.
  • Adds regression tests and updates design, requirements, verification, and user documentation.
File Description
test/​ApiMark.Vhdl.Tests/​VhdlEmitterGradualDisclosureTests.cs Updated as part of this pull request.
test/​ApiMark.Tool.Tests/​ProgramTests.cs Updated as part of this pull request.
test/​ApiMark.MSBuild.Tests/​ApiMarkTaskTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​TypeNameSimplifierTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​TypeLinkResolverTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetGeneratorTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetEmitterSingleFileTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetEmitterModifierAndConstraintTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetEmitterGenericNamingTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetEmitterExternalSignatureTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetEmitterExternalNestedLinkTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DotNetEmitterBreadcrumbTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Tests/​DocumentationCoverageCheckerTests.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​RecordShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​ParamsClass.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​OverloadMatrix.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​OverloadIndexFixtures.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​NullableSignatureMatrix.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​NewModifierShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​NestedExternalConsumer.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​NavigationTypes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​InheritedMembersShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​InheritanceShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​GenericTypeDocs.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​GenericNamingFixtures.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​ExternalSignatureShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​ExternalGenericConsumer.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​ConstraintShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures/​AccessorShapes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures.External/​NestedExternalTypes.cs Updated as part of this pull request.
test/​ApiMark.DotNet.Fixtures.External/​ExternalGenericFormat.cs Updated as part of this pull request.
test/​ApiMark.Cpp.Tests/​CppTypeLinkResolverTests.cs Updated as part of this pull request.
test/​ApiMark.Cpp.Tests/​CppEmitterTests.cs Updated as part of this pull request.
test/​ApiMark.Cpp.Tests/​CppEmitterGradualDisclosureTests.cs Updated as part of this pull request.
test/​ApiMark.Cpp.Tests/​ClangAstParserTests.cs Updated as part of this pull request.
test/​ApiMark.Core.Tests/​FileMarkdownWriterFactoryTests.cs Updated as part of this pull request.
src/​ApiMark.Vhdl/​VhdlEmitter.cs Updated as part of this pull request.
src/​ApiMark.MSBuild/​build/​DemaConsulting.ApiMark.MSBuild.targets Updated as part of this pull request.
src/​ApiMark.MSBuild/​ApiMarkTask.cs Updated as part of this pull request.
src/​ApiMark.DotNet/​DotNetGenerator.cs Updated as part of this pull request.
src/​ApiMark.DotNet/​DotNetEmitterSingleFile.cs Updated as part of this pull request.
src/​ApiMark.DotNet/​DotNetAstModel.cs Updated as part of this pull request.
src/​ApiMark.DotNet/​DocumentationCoverageChecker.cs Updated as part of this pull request.
src/​ApiMark.Cpp/​CppTypeLinkResolver.cs Updated as part of this pull request.
src/​ApiMark.Cpp/​CppEmitter.cs Updated as part of this pull request.
src/​ApiMark.Core/​FileMarkdownWriterFactory.cs Updated as part of this pull request.
requirements.yaml Updated as part of this pull request.
README.md Updated as part of this pull request.
docs/​verification/​introduction.md Updated as part of this pull request.
docs/​verification/​definition.yaml Updated as part of this pull request.
docs/​verification/​api-mark-msbuild/​api-mark-task.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​xml-doc-reader.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​type-name-simplifier.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​type-link-resolver.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​dot-net-emitter.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​dot-net-emitter-single-file.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​dot-net-emitter-gradual-disclosure.md Updated as part of this pull request.
docs/​verification/​api-mark-dot-net/​documentation-coverage-checker.md Updated as part of this pull request.
docs/​verification/​api-mark-cpp/​cpp-type-link-resolver.md Updated as part of this pull request.
docs/​verification/​api-mark-cpp/​cpp-emitter.md Updated as part of this pull request.
docs/​verification/​api-mark-cpp/​cpp-emitter-gradual-disclosure.md Updated as part of this pull request.
docs/​verification/​api-mark-core/​file-name-sanitizer.md Updated as part of this pull request.
docs/​verification/​api-mark-core/​file-markdown-writer-factory.md Updated as part of this pull request.
docs/​user_guide/​vhdl.md Updated as part of this pull request.
docs/​user_guide/​msbuild.md Updated as part of this pull request.
docs/​user_guide/​dotnet.md Updated as part of this pull request.
docs/​user_guide/​cpp.md Updated as part of this pull request.
docs/​sysml2/​model/​api-mark-core/​file-name-sanitizer.sysml Updated as part of this pull request.
docs/​sysml2/​model/​api-mark-core.sysml Updated as part of this pull request.
docs/​reqstream/​api-mark-msbuild/​api-mark-task.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​xml-doc-reader.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​type-name-simplifier.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​type-link-resolver.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​dot-net-emitter.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​dot-net-emitter-single-file.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​dot-net-emitter-gradual-disclosure.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-dot-net/​documentation-coverage-checker.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-cpp/​cpp-type-link-resolver.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-cpp/​cpp-emitter.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-cpp/​cpp-emitter-gradual-disclosure.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-core/​file-name-sanitizer.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-core/​file-markdown-writer-factory.yaml Updated as part of this pull request.
docs/​reqstream/​api-mark-core.yaml Updated as part of this pull request.
docs/​design/​definition.yaml Updated as part of this pull request.
docs/​design/​api-mark-vhdl/​vhdl-emitter.md Updated as part of this pull request.
docs/​design/​api-mark-msbuild/​api-mark-task.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​xml-doc-reader.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​type-name-simplifier.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​type-link-resolver.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​dot-net-emitter.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​dot-net-emitter-single-file.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​dot-net-emitter-gradual-disclosure.md Updated as part of this pull request.
docs/​design/​api-mark-dot-net/​documentation-coverage-checker.md Updated as part of this pull request.
docs/​design/​api-mark-cpp/​cpp-type-link-resolver.md Updated as part of this pull request.
docs/​design/​api-mark-cpp/​cpp-emitter.md Updated as part of this pull request.
docs/​design/​api-mark-cpp/​cpp-emitter-gradual-disclosure.md Updated as part of this pull request.
docs/​design/​api-mark-core/​file-name-sanitizer.md Updated as part of this pull request.
docs/​design/​api-mark-core/​file-markdown-writer-factory.md Updated as part of this pull request.
docs/​design/​api-mark-core.md Updated as part of this pull request.
.reviewmark.yaml Updated as part of this pull request.
.cspell.yaml Updated as part of this pull request.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/ApiMark.Cpp/CppEmitter.cs Outdated
Comment thread src/ApiMark.Cpp/CppTypeLinkResolver.cs Outdated
Comment thread docs/design/api-mark-dot-net/dot-net-emitter.md Outdated
…tion, stale fields doc

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 02:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One or more issues must be addressed before approval.

1 open finding
3 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Keep the H3 row adjacent to the H2 table row

docs/​user_guide/​vhdl.md:170

This blank line terminates the Markdown table before the H3 row, so the member row is rendered as ordinary text instead of a table row. Keep the H3 row adjacent to the H2 row.

🧠 Review effort: Lite

Comment thread src/ApiMark.Vhdl/VhdlEmitterGradualDisclosure.cs Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 02:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An unresolved critical VHDL filename collision and a moderate MSBuild warning issue remain.

1 open finding
1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Update path patterns to use sanitized filename helpers

docs/​design/​api-mark-dot-net/​dot-net-emitter-gradual-disclosure.md:396

This new path-conventions note says all generated names use GetTypeFileName/GetSanitizedMemberFileName, but the path patterns immediately below still prescribe FlattenArity(type.Name) and raw memberName/lowerKey values. That contradicts the implemented collision and reserved-name handling (and the documented Foo-1 breaking change), so the design document still directs readers to stale paths; please update those patterns to the actual helpers and sanitized outputs.

🧠 Review effort: Lite

Comment thread src/ApiMark.Vhdl/VhdlEmitter.cs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 03:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unresolved moderate findings remain in nested tuple-name handling and MSBuild version messaging.

0 open findings

1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Correct link version warning when an explicit override is set

src/​ApiMark.MSBuild/​ApiMarkTask.cs:511

This warning is inaccurate when ApiMarkLinkVersion is set: ResolveLinkVersion gives that explicit override precedence, but the message always says {version} uses PackageVersion and tells the user to set the override. Either suppress the mismatch warning when an explicit override is present or report that the override wins.

🧠 Review effort: Lite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 03:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unresolved moderate findings remain in filename sanitization, inheritance handling, and external type-link resolution.

0 open findings

Previously missed (1)

In code that hasn't changed since last review

Medium severity Model C# name hiding across member kinds and overloads

src/​ApiMark.DotNet/​DotNetEmitter.cs:631

The inherited-member suppression key does not model C# name hiding across member kinds or overloads. A derived void M(string) hides the base M(int) from member lookup, and a derived field/property named M hides base methods named M, but these keys remain M:(...) versus N:M, so the base members are still listed under Inherited Members. Build the suppression state around hidden member names (while separately handling overrides/overloads) so the listing matches the actual derived-type surface.

🧠 Review effort: Lite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 03:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved path-collision, accessibility, nullable-tuple, and generic-link defects remain.

1 open finding

🧠 Review effort: Lite

Comment thread src/ApiMark.DotNet/DotNetEmitter.cs
@Malcolmnixon
Malcolmnixon merged commit ea1ddc5 into main Oct 15, 2026
16 checks passed
@Malcolmnixon
Malcolmnixon deleted the fix/plexus-reported-issues branch October 15, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants