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
The SwiftIfConfig library has a BuildConfiguration protocol, but there is no concrete implementation of the BuildConfiguration protocol in the library. The only BuildConfiguration in normal use right now is buried in the Swift compiler itself, to query the configuration of the compiler.
We should add some kind of "fixed" or "static" build configuration that conforms to BuildConfiguration and is Codable so it can easily be saved and restored. Ideas for such a configuration:
Use it for some of the unit tests instead of the bare-bones testing build configuration we have now
Extend the compiler and/or SourceKit with an option to dump out JSON in a format that's compatible with this type, so tools can query the build configuration once and then apply it in other contexts such as an IDE (e.g., in SourceKit-LSP)
Extend swift-parser-cli with an option to apply a build configuration file (the serialized JSON), removing all of the inactive #if regions based on that configuration (SwiftIfConfig already has an API for this)
The text was updated successfully, but these errors were encountered:
Description
The SwiftIfConfig library has a
BuildConfiguration
protocol, but there is no concrete implementation of theBuildConfiguration
protocol in the library. The onlyBuildConfiguration
in normal use right now is buried in the Swift compiler itself, to query the configuration of the compiler.We should add some kind of "fixed" or "static" build configuration that conforms to
BuildConfiguration
and isCodable
so it can easily be saved and restored. Ideas for such a configuration:#if
regions based on that configuration (SwiftIfConfig already has an API for this)The text was updated successfully, but these errors were encountered: