Skip to content

Conversation

@gennaroprota
Copy link
Collaborator

@alandefreitas: Please let me know what you think and... if I have commented it too much :-).

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

🚧 Danger.js checks for MrDocs are experimental; expect some rough edges while we tune the rules.

⚠️ Warnings

Warning

Some commits do not follow Conventional Commit first-line formatting (type(scope): subject): Make the dependency on Boost.Describe private again, Properly nest the XML output, Don't serialize Location::FullPath, Update the XML schema, Fix the XML schema, Restore TagFile in the XML schema Examples: fix: adjust docs link, feat(api): allow overrides.

ℹ️ Info

Note

Commit ccbcd73 (fix: replace the XML generator with a reflection-based one) touches 2053 source lines (non-test). Large change; add reviewer context if needed.

✨ Highlights

  • 🧪 Existing golden tests changed (behavior likely shifted)

🧾 Changes by Scope

Scope Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🥇 Golden Tests 41780 33072 8708 231 - 231 - -
🛠️ Source 2077 829 1248 6 1 5 - -
🏗️ Build / Toolchain 1107 776 331 1 - 1 - -
🤝 Third-party 87 - 87 2 - - - 2
Total 45051 34677 10374 240 1 237 - 2

Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)

🔝 Top Files

  • test-files/golden-tests/javadoc/ref/ref.xml (Golden Tests): 2765 lines Δ (+2182 / -583)
  • test-files/golden-tests/config/auto-function-metadata/returns-from-special.xml (Golden Tests): 2613 lines Δ (+1936 / -677)
  • test-files/golden-tests/config/inherit-base-members/copy-dependencies.xml (Golden Tests): 2390 lines Δ (+1754 / -636)

Generated by 🚫 dangerJS against f141955

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://1151.mrdocs.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-01-21 17:01:42 UTC

@alandefreitas
Copy link
Collaborator

I think we should be removing way more code than including for this PR to make sense. The test outputs haven't even changed. This should be a bug fix, not a refactor. The biggest problem with this generator is that it's not in sync with the metadata. And the reason this generator is out of sync is that we didn't have reflection, and manually keeping it in sync was too expensive and fragile. So what we want to do is let reflection handle the whole thing, and the whole generator will have only one or two functions that recursively iterate over everything to generate the metadata. 🥳

This means the XML outputs will change completely, as they now reflect everything in the metadata, which is what this generator was meant for. Our intention is not to recreate the broken version, but to recreate it with reflection. If we don't fix it, reflection would mean more code rather than less, as we now have to force reflection to recreate the errors we had without it (which is even harder than just keeping the original errors). And that's going to be extra code just to maintain it broken.

I think another issue here is that we should probably address the other issue first, where we should remove those small workarounds from reflection to make it reflect into different key names. Only canonical names should be used. All generators should have access to the same fields with the same names. Making this happen is basically just the finalization of the previous issue we already merged. And maybe the @meta field is required to make that happen, since ambiguity might arise. Only after establishing the canonical field names can we use them to generate XML. 😅

@alandefreitas
Copy link
Collaborator

What happened to this PR? I thought it would become more active after #1153 🚀

@gennaroprota
Copy link
Collaborator Author

gennaroprota commented Jan 29, 2026

I removed the commit before pulling, after merging #1153, and GitHub closed it. I shouldn't have used the develop branch.

@alandefreitas
Copy link
Collaborator

Oh 😅

This fixes the XML generator, which was out of sync with our metadata,
by replacing it with a reflection-based implementation. The XML output
structure changes completely, but contains equivalent information.
@gennaroprota gennaroprota reopened this Feb 2, 2026
@gennaroprota gennaroprota changed the title refactor: leverage reflection in the XML generator fix: leverage reflection in the XML generator Feb 2, 2026
@gennaroprota gennaroprota marked this pull request as draft February 2, 2026 17:57
@gennaroprota gennaroprota changed the title fix: leverage reflection in the XML generator fix: replace the XML generator with a reflection-based one Feb 2, 2026
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.

3 participants