Skip to content

Generate doc includes for macros and static fields - #845

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
zjdangge:codex/value-documentation-includes
Nov 4, 2026
Merged

tannergooding merged 1 commit into
dotnet:mainfrom
zjdangge:codex/value-documentation-includes

Conversation

@zjdangge

Copy link
Copy Markdown
Contributor

Fixes #832.
Fixes #834.

With --generate doc-includes, macro constants and static variables currently lack XML documentation includes. BeginValue only emits them for enumerators, and variable declarations do not supply their containing type.

Supply the generated class or remapped record name for variable declarations, and emit includes for values with a parent name. Add baseline tests for a macro assigned to a custom class, a static struct constant, and a remapped static member. The baselines cover both output modes and all configuration/platform variants.

Validation on Windows:

  • The new regressions failed in all 24 C# variants before the fix; all 48 C#/XML variants pass after it.
  • Release solution build: 0 warnings, 0 errors.
  • dotnet test -c Release --no-build: 4,361 passed, 0 failed, with 4,112 platform variants skipped.
  • With RUN_ALL_VARIANTS=1, the full suite reports 8,457 passed and 16 failures in the Unix variants of WideStringLiteralConstTest / WideStringLiteralStaticConstTest. All 16 failures reproduce with identical messages on unchanged main (0c1c4098a7aab7cb392a2367b75d447bbac05d58); the added documentation tests all pass.

The self-hosted bindings were not regenerated because the LLVM headers are unavailable here. Neither generation response file enables doc-includes, so no binding changes are expected.

@tannergooding
tannergooding merged commit 5555ddb into dotnet:main Nov 4, 2026
12 checks passed
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.

-g doc-includes doesn't generate <include> for static fields -g doc-includes doesn't generate <include> for -g macro-bindings

2 participants