Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56239
Doxygen incorrectly merges base classes from primary templates into their partial specializations. In C++, a specialization's inheritance list completely replaces the primary template's, but Doxygen combines both into a single basecompoundref list.
- **Contradictory type traits** — is_optional<std::optional<T>> and is_variant_of_data_types<std::variant<Ts...>> showed inheritance from both std::false_type (primary) and std::true_type (specialization)
- **Duplicate base classes** — Converter<jsi::Object> listed ConverterBase<jsi::Object> twice (once from the primary template after substitution, once from the specialization)
This diff fixes both issues with two complementary mechanisms:
- **Dedup-by-name (Extendable._deduplicate_base_classes)**: removes exact duplicate base classes, keeping the last occurrence. Handles cases where Doxygen's template argument substitution produces identical names.
- **Primary template base subtraction (StructLikeScopeKind._remove_merged_primary_bases)**: for partial specializations, looks up the primary template among sibling scopes and performs count-based subtraction of its bases. Count-based (rather than set-based) subtraction correctly preserves bases that a specialization explicitly re-inherits from the same class as the primary.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D98291360
fbshipit-source-id: 82b34969b13c7df8babf2c5efc222b29979d6361
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56085
Changelog: [Internal]
Moves the logic responsible for generating a string view of the scope's body to the base class to reduce duplication.
Similarly, moves the logic responsible for qualifying template arguments to the `Extensible` class.
Reviewed By: cipolleschi
Differential Revision: D96455746
fbshipit-source-id: 1d800c7992080e02831f61fee4aaa9cb31f8fc9a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56075
Changelog: [Internal]
Updates the parser to extract the template specializations from name string in order to avoid repeated operations on the name string.
Reviewed By: cipolleschi
Differential Revision: D96303732
fbshipit-source-id: 08ff8ba34522426adccd53129590c5a7d59e0438
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56074
Changelog: [Internal]
Extracts the duplicated handling of inheritance and base classes to a separate, reusable class.
Reviewed By: cipolleschi
Differential Revision: D96287394
fbshipit-source-id: 6075b5dafb754167b6f78abbaee60c1243c99bb5