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
SwiftPM's documentation says the following about this platforms stanza, with two sections highlighted:
By default, the Swift Package Manager assigns a predefined minimum deployment version for each supported platforms unless you configure supported platforms using the platforms API. This predefined deployment version is the oldest deployment target version that the installed SDK supports for a given platform.
The Swift Package Manager will emit an error if a dependency is not compatible with the top-level package's deployment version. The deployment target of a package's dependencies must be lower than or equal to the top-level package's deployment target version for a particular platform.
What SwiftPM is apparently not saying is that it will only perform this check for the specific platform being built at any given time. This means that SwiftPM does not notice that the platforms stanzas are incompatible until you actually try to build for the given platform.
I think this is invalid behaviour for SwiftPM, at least when developing a library (that is, if you type swift build or swift test in a library package). It would be extremely useful for it to inform developers that they have invalid package constraints.
Additional Detail from JIRA
md5: 60ae44531c0a6c377e7e6fd5afdf6726
Issue Description:
Vapor's PostgresNIO currently expresses the following platforms stanza:
However, PostgresNIO also depends on Swift Crypto, which expresses the following platforms stanza:
SwiftPM's documentation says the following about this platforms stanza, with two sections highlighted:
What SwiftPM is apparently not saying is that it will only perform this check for the specific platform being built at any given time. This means that SwiftPM does not notice that the platforms stanzas are incompatible until you actually try to build for the given platform.
I think this is invalid behaviour for SwiftPM, at least when developing a library (that is, if you type
swift build
orswift test
in a library package). It would be extremely useful for it to inform developers that they have invalid package constraints.Note that this needs to be filtered through the lens of also needing to fix https://bugs.swift.org/browse/SR-11489.
The text was updated successfully, but these errors were encountered: