[SymbolGraphGen] Allow documenting API using modernized syntax even when ABI prevents an update to the code #70711
Labels
duplicate
Resolution: Duplicates another issue
feature
A feature request or implementation
SymbolGraphGen
The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.
Feature Name
Documentation with Modernized Syntax for old API
Description
Some older API in the standard library are defined using classic generics syntax, and cannot be changed for historical (ABI) reasons. It would be nice to be able to display these using a source-compatible modernized syntax in documentation.
Motivation
Some API are declared using old generics syntax, and would read better using modernized syntax. For example:
would read better as:
The second version names the important type (
Element
), while making the incidental type (the collection) anonymous. The original version, using classic syntax, names the incidental type while obscuring the important one.This would not be an ABI-compatible change, though it is source-compatible.
Importance
It would allow our documentation to use modern syntax even in cases where the function definition requires the old syntax for historical reasons (e.g. ABI stability).
Alternatives Considered
No response
The text was updated successfully, but these errors were encountered: