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 default supported platforms are pretty unhelpful for SPM: if they are not specified in the package description then they default to a wide selection of platforms (e.g. macOS 10.10).
The problem is twofold:
It is not clear to a developer what the supported platforms are, since swift package init does not generated an explicit list of supported platforms, and
It is hard to change the platforms, since doing so is a SemVer major change and the defaults are so wide if not specified.
Ideally packages should start with – or default to, in the case of no explicitly supported platforms – the most recent supported version of each platform. This way developers may widen their support if possible without a SemVer major change.
The text was updated successfully, but these errors were encountered:
Just to clarify first: the `platforms` API does not restrict the supported platforms of a package in any way, it is only used for specifying the minimum deployment target when building the package for a particular platform. This also means that there is no list of supported platforms, all platforms are implicitly always supported.
For narrowing the default version range, could you elaborate more on what the motivation is? In general, if you are using API that's not available in older versions, availability should already lead to the package not building until you narrow the deployment target.
Additional Detail from JIRA
md5: ad4b0eec4d4bc17076f31ee18ce239ff
Issue Description:
The default supported platforms are pretty unhelpful for SPM: if they are not specified in the package description then they default to a wide selection of platforms (e.g. macOS 10.10).
The problem is twofold:
It is not clear to a developer what the supported platforms are, since
swift package init
does not generated an explicit list of supported platforms, andIt is hard to change the platforms, since doing so is a SemVer major change and the defaults are so wide if not specified.
Ideally packages should start with – or default to, in the case of no explicitly supported platforms – the most recent supported version of each platform. This way developers may widen their support if possible without a SemVer major change.
The text was updated successfully, but these errors were encountered: