SE-0264 (review #2) — Standard Library Preview Package

Looking at the prototype, why is the package named swift-preview? Right now we kind of have an inconsistent mess:

Package Name Library Name
SwiftPM SwiftPM (or SwiftPM-auto)
SwiftSyntax SwiftSyntax
swift-format SwiftFormat
cmark cmark
llbuild llbuildSwift
(swift-preview) (SwiftPreview)

This will become more apparent when SE‐0226 comes to fruition. (And the PRs are rolling in as we speak! :tada:) From its proposal (emphasis added):

To achieve this, the package manager needs to associate the product dependencies with the packages which provide those products without cloning them. We propose to make the package name parameter in the product dependency declaration non-optional. This is necessary because if the package name is not specified, the package manager is forced to resolve all package dependencies just to figure out the packages for each of the product dependency. SwiftPM will retain support for the byName declaration for products that are named after the package name. This provides a shorthand for the common case of small packages that vend just one product.

extension Target.Dependency {
    static func product(name: String, package: String) -> Target.Dependency
}
2 Likes