Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute platform beta status when using
@Available
Changes: - Sets `AvailabilityRenderItem.isBeta` when `AvailabilityRenderItem.init?(_ :current:)` is called - Makes `AvailabilityRenderItem.isBeta`, `AvailabilityRenderItem. introduced` and `AvailabilityRenderItem.name` into `let` properties as they are integral to availability rendering. Unifies the behavior in `AvailabilityRenderItem` so that we always compute whether a platform is in beta, regardless of whether the availability information comes from the symbol graph or comes from the `@Available` directive. This fixes an issue where sample code articles defined with `@Available` directives would never display a beta badge regardless of whether the platform was configured to be a beta platform. Additionally, makes `isBeta` a `let` property to avoid any future bugs, as the code will now no longer compile unless this property is set in an initializer. Resolves rdar://129355087.
- Loading branch information