You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RenderNodeTranslator.visitSymbol filters out availability items with a missing domain (#1256)
RenderNodeTranslator.visitSymbol filters out availability items which have a missing or invalid domain (platform name).
Swift developers can add global availability messages with no specific platform information, for example like this:
@available(*, deprecated, message:
"""
Don't use this function; call some other function instead.
"""
)
In this scenario, the Swift compiler adds an availability item with the
message but no domain (platform name) to the symbol graph file, like
this:
{
"domain": null,
"isUnconditionallyDeprecated": true,
"message": "Don't use this function; call some other function instead."
}
To avoid displaying an empty/null platform in the DocC Render user
interface, the RenderNodeTranslator needs to filter out these records.
Additionally, AvailabilityRenderOrder.compare always returns false for
availability items that have no name, leading to an unpredictable sort
order when any of the items is missing a platform name, even for
availability items that had a valid platform name.
0 commit comments