I'm unsure whether this belongs more to the PM category or versioning or something else so please point me in the right direction if this is the wrong place.
In the source code for the SwiftPM API there are statements like
@available(_PackageDescription, introduced: 4.2, obsoleted: 5).
This appears to be different from what is usable from Xcode (10/11).
First: the _PackageDescription version identifier is set in some undocumented way (or I can't find the docs). I can only use swift/iOS/macOS, not custom identifiers.
Second: it appears that all symbols marked with
@available(_PackageDescription, ...) are ignored by the compiler. At least that's the conclusion I draw from them being omitted from the public API in the PackageDescription dylib bundled with Xcode for v4 and v4.2.
I realize that the underscore in the _PackageDescription symbol indicates unofficial, undocumented, unfinished or secret for some other reason and I'm not gonna find any answers about Xcode things. I just want to ask in case there are answers to be found here so I would appreciate any information that helps me answer the following questions.
Is there a way to pass a version value to the compiler for a custom identifier so it's picked up in the @available statement?
Building a package still works. How can that be since the dylib in Xcode should throw errors when using the unavailable APIs?
Where is the binary for PackageDescription API v5? I can only find dylib files for v4 and v4.2 bundled with Xcode 11.