DeprecationControl

Swift
public struct DeprecationControl: Sendable

A Compiler’s deprecation settings.

Indicates which Deprecations should be fatal, silenced, or eagerly adopted.


Topics

var fatal: Set<Deprecation>

The set of deprecations to be treated as compiler errors.

Declaration
Swift
public let fatal: Set<Deprecation>

var silenced: Set<Deprecation>

The set of deprecations to be ignored.

Declaration
Swift
public let silenced: Set<Deprecation>

var future: Set<Deprecation>

The set of future deprecations to be opted-in early.

Declaration
Swift
public let future: Set<Deprecation>

init(fatal: any Sequence<Deprecation>, silenced: any Sequence<Deprecation>, future: any Sequence<Deprecation>)

Create a new DeprecationControl.

Making mistakes with these – for example passing an unknown deprecation string, or putting the same deprecation in multiple places in confusing ways – is reported through warnings from the Sass compiler when you compile a stylesheet.

Declaration
Swift
public init(
    fatal: any Sequence<Deprecation> = [],
    silenced: any Sequence<Deprecation> = [],
    future: any Sequence<Deprecation> = [])