Skip to content

fix: macro member order - #1247

Merged
alandefreitas merged 1 commit into
cppalliance:developfrom
alandefreitas:fix/sort-macros
Jul 30, 2026
Merged

fix: macro member order#1247
alandefreitas merged 1 commit into
cppalliance:developfrom
alandefreitas:fix/sort-macros

Conversation

@alandefreitas

Copy link
Copy Markdown
Collaborator

Macros showed up in extraction order instead of sorted. The member sort walked a handwritten list of tranches that never got the macros, so macros were skipped. This PR walks the buckets by reflection instead, so macros come out sorted, and any bucket added later is covered without touching the sort.

Changes

The member sort now covers every tranche of a member group with reflection rather than a fixed list. The macro fixtures were regenerated and now list macros in sorted order.

Testing

The regenerated macro fixtures cover the ordering and run on every build.

Documentation

This is a fix. No documentation changes needed.

sortMembers listed each tranche bucket by hand and never got updated
when the Macros bucket was added, so macros skipped the sort and rendered
in extraction order.

Iterate the tranche's members via describe::for_each_member instead, so
every bucket (Macros included) is sorted and new buckets stay in sync
without touching this code.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

Copy link
Copy Markdown

⚠️ Warnings

Warning

PR description is short (618 chars) relative to the size of this change (~840 lines of churn). Aim for around 777 characters — expand on rationale, testing, and reviewer guidance.

✨ Highlights

  • 🧪 Existing golden tests changed (behavior likely shifted)

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🥇 Golden Tests 96% 810 405 405 11 - 11 - -
🛠️ Source 4% 30 9 21 1 - 1 - -
Total 100% 840 414 426 12 - 12 - -

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

🔝 Top Files

  • tests/golden/fixtures/symbols/macro/macros.xml (Golden Tests): 480 lines Δ (+240 / -240)
  • tests/golden/fixtures/symbols/macro/macros-edge-cases.xml (Golden Tests): 74 lines Δ (+37 / -37)
  • tests/golden/fixtures/config/extract-all/no-extract-all-macros.xml (Golden Tests): 50 lines Δ (+25 / -25)

Generated by 🚫 dangerJS against a921d6e

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.12%. Comparing base (b79e66d) to head (a921d6e).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1247   +/-   ##
========================================
  Coverage    83.12%   83.12%           
========================================
  Files           35       35           
  Lines         3662     3662           
  Branches       845      845           
========================================
  Hits          3044     3044           
  Misses         410      410           
  Partials       208      208           
Flag Coverage Δ
bootstrap 83.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cppalliance-bot

Copy link
Copy Markdown

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

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

2026-07-30 17:13:25 UTC

@alandefreitas
alandefreitas enabled auto-merge July 30, 2026 17:14
@alandefreitas
alandefreitas added this pull request to the merge queue Jul 30, 2026
Merged via the queue into cppalliance:develop with commit 14a36c8 Jul 30, 2026
56 of 58 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.

2 participants