Skip to content

[SR-15982] SymbolKit crashes when encoding unknown mixins #37

@franklinsch

Description

@franklinsch
Previous ID SR-15982
Radar rdar://problem/90348996
Original Reporter @franklinsch
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Swift-DocC
Labels Improvement
Assignee None
Priority Medium

md5: 7a780d28224eef5a62504852074094c5

Issue Description:

SymbolKit decodes unknown Symbol mixins just fine by adding them to Symbol.mixins, but {{fatalError}}s when encoding unknown mixins: https://github.com/apple/swift-docc-symbolkit/blob/main/Sources/SymbolKit/SymbolGraph/Symbol/Symbol.swift#L180.

For example, when decoding a symbol graph from the Swift compiler (which includes the location mixin) and encoding it back, SymbolKit crashes.

We should make SymbolKit encode unknown mixins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions