Skip to content

Treat "mac" as macOS when filtering by @props - #4026

Open
saudsami wants to merge 1 commit into
masterfrom
fix-mac-platform-token
Open

saudsami wants to merge 1 commit into
masterfrom
fix-mac-platform-token

Conversation

@saudsami

@saudsami saudsami commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Reported externally: the English AgoraAudioLocalReason page is missing enum value descriptions that the Chinese page has.

Cause: a vocabulary mismatch

The corpus spells macOS mac — 1,962 uses against a single macos — but the build is invoked with --platform_tag macos, and nothing mapped one to the other. So every element tagged for macOS was dropped from the macOS build, the one place it belongs.

<plentry props="cpp mac unreal bp unity flutter electron cs">
  7: (Windows and macOS only) No local audio playback device...

That plentry is removed when building macos, which is why the macOS page documents 5 of 9 enum values while iOS documents 7.

This predates the recent @props work. The previous implementation tested whether the platform appeared as a substring of props, and macos is not a substring of cpp mac unreal. The group rewrite in #4021 kept the blind spot by listing macos without mac.

Scope — far wider than the report

elements tagged mac the macOS build drops 1,961
files affected 1,272

Not only prose. props="ios mac" also carries Objective-C prototypes, so the macOS reference has been losing method signatures:

props='mac'       - (int)adjustLoopbackRecordingVolume:(NSInteger)volume;
props='ios mac'   - (instancetype _Nonnull)initWithSize:(CGSize)size frameRate…

The fix

One entry in PLATFORM_GROUPS:

"mac": {"macos"},

Verification

platform result
macos 296 of 932 entries change; documentation 665,170 → 718,955 chars (+53,785); enum_localaudiostreamreason 5 → 7 documented values
ios, unity, flutter byte-identical

Tests added for the mapping, that mac doesn't widen any other platform, and that a group token never matches a --platform_tag directly. Confirmed they fail with the entry removed.

Please confirm the convention

I'm treating mac as meaning macOS, which the content strongly supports — (Windows and macOS only) sits on props='cpp mac …'. If mac ever carried a narrower meaning, this would pull in content that was deliberately excluded. One line either way, so cheap to correct if I've read it wrong.

🤖 Generated with Claude Code

Reported externally: the English AgoraAudioLocalReason page is missing enum
value descriptions the Chinese page has.

The cause is a vocabulary mismatch. The corpus spells macOS "mac" -- 1,962
uses against a single "macos" -- but the build is invoked with
--platform_tag macos, and nothing mapped one to the other. So every element
tagged for macOS was dropped from the macOS build, the one place it belongs.

  <plentry props="cpp mac unreal bp unity flutter electron cs">
    7: (Windows and macOS only) No local audio playback device...

That plentry is removed when building macos, which is why the macOS page
documents 5 of 9 enum values while iOS documents 7.

This predates the recent @props work: the previous implementation tested
whether the platform appeared as a substring of props, and "macos" is not a
substring of "cpp mac unreal". The group rewrite in #4021 kept the blind spot
by listing macos without mac.

Scope, across en-US/dita/RTC-NG/API:

  elements tagged mac that the macOS build drops   1,961
  files affected                                   1,272

Not only prose -- props="ios mac" also carries Objective-C prototypes, so the
macOS reference has been losing method signatures too.

Regenerating the templates:

  macos      296 of 932 entries change; documentation grows
             665,170 -> 718,955 characters (+53,785)
             enum_localaudiostreamreason: 5 -> 7 documented values
  ios, unity, flutter   byte-identical

Add tests for the mapping, including that mac does not widen any other
platform and that a group token never matches a --platform_tag directly.
Confirmed they fail with the entry removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@saudsami
saudsami requested a review from Foesa-yyx October 22, 2026 09:45
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.

1 participant