[SymbolGraphGen] Automatically use new generics notation #70588
Labels
ASTPrinter
Area → compiler: The AST printer
feature
A feature request or implementation
generic constraints
Feature → generics: generic constraints
SymbolGraphGen
The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.
Feature Name
Use new generics notation
Description
It would be nice if DocC had the ability to rewrite function signatures using the new generics notation. Package developers who need to support older versions of the compiler may need to keep using the angle-bracket notation, even in cases where it would be possible to use
some
types or primary associated types instead.But for documentation, we still want to present the clearest interface to users, and both notations have equivalent meaning.
For example, if I write:
It would be nice if it appeared in documentation as:
Similarly, for primary associated types. I write:
But that's long and wraps to multiple lines in the topics list. It's not very readable - type names ("
Source
") get introduced at the start, used in the middle, then explained using constraints at the end.And it would be nice if DocC could present this as:
Even if I need to keep writing it the old way for compatibility purposes.
Motivation
No response
Importance
No response
Alternatives Considered
No response
The text was updated successfully, but these errors were encountered: