Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12400] Unhelpful supported platform defaults for SPM #4573

Open
glbrntt opened this issue Mar 24, 2020 · 3 comments
Open

[SR-12400] Unhelpful supported platform defaults for SPM #4573

glbrntt opened this issue Mar 24, 2020 · 3 comments

Comments

@glbrntt
Copy link
Contributor

glbrntt commented Mar 24, 2020

Previous ID SR-12400
Radar rdar://problem/60832880
Original Reporter @glbrntt
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Improvement
Assignee None
Priority Medium

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, 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.

@glbrntt
Copy link
Contributor Author

glbrntt commented Mar 24, 2020

@swift-ci

@beccadax
Copy link
Contributor

@swift-ci create

@neonichu
Copy link
Member

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.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants