mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Parsing for `-enable-upcoming-feature` and `-enable-experimental-feature` is lenient by default because some projects need to be compatible with multiple language versions and compiler toolchains simultaneously, and strict diagnostics would be a nuisance. On the other hand, though, it would be useful to get feedback from the compiler when you attempt to enable a feature that doesn't exist. This change splits the difference by introducing new diagnostics for potential feature enablement misconfigurations but leaves those diagnostics ignored by default. Projects that wish to use them can specify `-Wwarning StrictLanguageFeatures`.
9 lines
444 B
Markdown
9 lines
444 B
Markdown
# Strict language feature enablement
|
|
|
|
By default, if an unrecognized feature name is specified with the
|
|
`-enable-upcoming-feature` or `-enable-experimental-feature` flags, the compiler
|
|
will ignore it without emitting a diagnostic since some projects must be
|
|
simultaneously compatible with multiple versions of the language and toolchain.
|
|
However, this warning group can be enabled to opt-in to detailed diagnostics
|
|
about misspecified features.
|