-
Notifications
You must be signed in to change notification settings - Fork 639
Description
This issue tracks the fix for a set of related bugs tagged by ae-ambiguous-ids. These issues all involve IDs that are generated using a surjective mapping that results in naming collisions (e.g. a file being ovewritten) or instability (e.g. a hyperlink being broken after a SemVer MINOR change).
The problem was summarized in #1252 (comment):
we need a naming pattern that ideally would satisfy several requirements:
- be unambiguous, i.e. provide a one-to-one mapping for all possible inputs
- be stable, e.g. adding a new function overload should not cause the UID to change for a preexisting function overload (since that could lead to broken hyperlinks)
- look "nice" to humans (particularly for the
name
field)(Elsewhere I pointed out that the TSDoc declaration reference notation meets 1 and 2, but perhaps not 3.)
Examples of problematic TypeScript constructs:
- a static member with the same name as an instance member
- a function with multiple overloads
- a merged declarations (e.g. an
enum X { ... }
alongsidenamespace X { ... }
)- an indexer (defined using symbols without any name) (e.g.
[key: string] : string;
as a member of an interface)
Certain IDs are case-insensitive, which means that e.g. noTallPeople
and NotAllPeople
may collide.
And here's a summary of the specific kinds of IDs that we need to solve this for:
- Markdown URLs: case insensitive, no special characters
- DocFX YAML URLs: case insensitive, no special characters
- DocFX YAML IDs: case sensitive, allows some special characters
- Titles that appear in docs: needs to look nice to a human
Metadata
Metadata
Assignees
Labels
Type
Projects
Status