<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Swift Package Manager community,<br class=""><br class="">The package manager's release in Swift 3 was a big success, with many enthusiastic adopters. Since then we've been&nbsp;hard at work building the next version of the package manager. We have a lot we want to do, but focus is important&nbsp;for building a successful tool, so we've defined a set of goals that we expect to focus on for Swift 4.&nbsp;As always, this roadmap may be amended based on feedback from the community, and pull&nbsp;requests for improvements outside this list are still welcome!<br class=""><br class="">This email covers a lot of different features, so instead of replying directly it would be best&nbsp;to start a new thread on any topic you'd like to discuss in detail.<br class=""><br class="">Tomorrow (Tuesday, January 24th), from 10-11am PST, package manager developers will be available for a dedicated hour in the (unofficial) SwiftPM&nbsp;Slack channel to answer questions about this roadmap; that's a great time to drop in and chat.&nbsp;If you haven't joined the SwiftPM Slack before,&nbsp;you can get an invite to do so by entering your email at&nbsp;<a href="https://swift-package-manager.herokuapp.com" class="">https://swift-package-manager.herokuapp.com</a>.<br class=""><br class=""><b class="">Work We've Completed</b><br class=""><br class="">We've implemented several large features and made many bugfixes and&nbsp;small improvements for this release already. The work we've already completed will also available&nbsp;in Swift 3.1; the remaining features to come will likely be in Swift 4 only.&nbsp;You can try out these changes now in trunk snapshots available on&nbsp;<a href="http://swift.org" class="">swift.org</a>.&nbsp;The most notable changes that we've made were:<br class=""><br class="">– Package Edit<br class=""><br class="">We've changed the workflow for making changes to a package's dependencies. Now,&nbsp;dependencies are stored in the tool-managed `.build` directory by default, but a new 'swift package edit'&nbsp;command allows users to "begin editing" on a package, moving it under the user's control (into the `Packages` directory),&nbsp;exempting it from dependency updates, and allowing the user to commit and push changes to that package.<br class=""><br class="">For more details, please see the documentation:&nbsp;<a href="https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md#editable-packages" class="">https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md#editable-packages</a>. The evolution proposal for this feature is at <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0082-swiftpm-package-edit.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0082-swiftpm-package-edit.md</a>.<div class=""><br class="">– Pinning<br class=""><br class="">We've implemented the ability for the package manager to record the versions of each dependency&nbsp;you've used, and to "pin" or "unpin" specific packages to allow or prevent updating them to newer&nbsp;versions. This enables users to share the exact versions of dependencies they've used with their&nbsp;teammates or with their continuous integration system.<br class=""><br class="">For more details, please see the documentation:&nbsp;<a href="https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md#package-pinning" class="">https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md#package-pinning</a>. The evolution proposal for this feature is at <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0145-package-manager-version-pinning.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0145-package-manager-version-pinning.md</a>.</div><div class=""><br class="">– Project Generation Improvements<br class=""><br class="">We've rewritten our support for generating Xcode projects and&nbsp;fixed a number of bugs in this area. The new project generation support is backed by unit tests and&nbsp;is more maintainable and extensible than the original support.<br class=""><br class="">– New Dependency Resolver<br class=""><br class="">We've redesigned our algorithm for resolving the package&nbsp;dependency graph to fix correctness issues, and added significantly better infrastructure for&nbsp;working with source control. The package manager also now incrementally updates checked-out packages&nbsp;when performing `swift package update` instead of re-cloning dependencies each time.&nbsp;Better performance optimization of the dependency resolution algorithm remains as a to-do.<br class=""><br class="">– Cycle Detection and Incremental Build Correctness<br class=""><br class="">The package manager now detects dependency cycles, and has overall better diagnostics for&nbsp;this and other problems. We've also fixed correctness issues in our&nbsp;incremental build support.<br class=""><br class="">– Parallel Cloning<br class=""><br class="">We've added experimental support for cloning packages in parallel during dependency resolution,&nbsp;instead of cloning them one at a time. This feature is not yet on by default, but can be&nbsp;used with `swift build --enable-prefetching` or `swift package --enable-prefetching update`. This feature will be available in the snapshots on&nbsp;<a href="http://swift.org" class="">swift.org</a>&nbsp;soon.<div class=""><br class="">– Improved Test Coverage and Infrastructure<br class=""><br class="">We've improved the test coverage for the package manager project itself.&nbsp;We've also added significant new infrastructure, including a new command-line argument parser,&nbsp;low-level utilities, and deeper integration with Git.<br class=""><br class=""><b class="">Planned Work for Swift 4</b><br class=""><br class="">These are the remaining features we plan to focus on for Swift 4:<br class=""><br class="">– Swift Versioning Support<br class=""><br class="">We need to define the package manager's behavior for handling the transition from&nbsp;Swift 3 to Swift 4. The Swift 4 compiler will support compiling source code using either the&nbsp;Swift 3 or Swift 4 language; Swift packages need some way to specify which language mode to use.&nbsp;In addition, we would like to be able to evolve the Package.swift manifest API, and to add&nbsp;new features which aren't supported by older versions of the package manager; we'll need a way to do so&nbsp;without causing packages that adopt these new features to break builds that are using an older&nbsp;version of Swift.<br class=""><br class="">We are expecting to draft an evolution proposal for this soon.<br class=""><br class="">– Product Types<br class=""><br class=""></div><div class="">We'd like to formalize the concept of "products" (such as libraries and&nbsp;executables) in Swift packages. This will allow better control over what types of products are&nbsp;produced (e.g. allowing users to request a static vs. a dynamic library), and will allow targets to&nbsp;depend on specific products produced by other packages instead of needing a broad dependency on an&nbsp;entire package.<br class=""><br class="">Implementation of this feature is in progress.&nbsp;For more details, please see the evolution proposal:&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0146-package-manager-product-definitions.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0146-package-manager-product-definitions.md</a><br class=""><br class="">– Support for Top-of-Tree and Branch-Based Package Development<br class=""><br class="">Currently a Swift package can only depend on tagged&nbsp;releases of its dependencies. This makes it difficult to use the package manager to work on top-of-tree of a&nbsp;package graph, or on other branches. This is a workflow that we'd like to support.<br class=""><br class="">There is a draft evolution proposal in progress at&nbsp;<a href="https://github.com/neonichu/swift-evolution/pull/1" class="">https://github.com/neonichu/swift-evolution/pull/1/files</a><br class=""><br class="">– Overriding Package Conventions<br class=""><br class="">The package manager provides certain conventions for the on-disk layout of a&nbsp;package which allow us to identify multiple modules, infer product types (executable vs library),&nbsp;associate tests with the module they test, etc. If you wish to create a Swift package from a source&nbsp;tree which does not conform to these conventions, there is currently no way to do so. We'd like for&nbsp;users to be able to override the conventions and explicitly specify how their source&nbsp;tree is laid out using directives in the Package.swift manifest.<br class=""><br class="">We are also considering removing some of the existing conventions so&nbsp;that there is one standardized conventional layout instead of the multiple supported layouts available&nbsp;today; if we do so, manifest convention overrides would allow existing packages that are using the alternate&nbsp;layouts to continue using those layouts.<br class=""><br class="">– Support Build Settings<br class=""><br class="">The package manager has no way to provide specific settings, such as compiler flags, for building the targets in a package.&nbsp;Some settings are critical for production code, such as the "deployment target"&nbsp;(the minimum OS version that the built code will run on). We need to provide a way to set&nbsp;at least the most important settings which users will need control over.<br class=""><br class="">– Redesign the Package Manifest API<br class=""><br class="">Our Package.swift manifest API was designed prior to the Swift 3 language conventions,&nbsp;and its design was not reviewed by the evolution process. We would like to redesign this API&nbsp;as necessary to provide a clean, conventions-compliant API that we can rely on in the future.<br class=""><br class="">– Performance Test Support<br class=""><br class="">Currently, the package manager has no support for running performance tests (as&nbsp;distinct from correctness tests).<br class=""><br class="">There is a draft evolution proposal in progress at&nbsp;<a href="https://github.com/aciidb0mb3r/swift-evolution/blob/pref-proposal/proposals/xxxx-package-manager-performance-testing.md" class="">https://github.com/aciidb0mb3r/swift-evolution/blob/pref-proposal/proposals/xxxx-package-manager-performance-testing.md</a><br class=""><br class="">– SwiftPM-as-a-Library<br class=""><br class="">The package manager should expose a library API for all of its commands,&nbsp;which will allow it to be integrated into an IDE. Initial work on this API is in&nbsp;progress, though the current API in development should not be considered&nbsp;a stable public API. Any clients adopting the API in progress&nbsp;should consider it subject to change in any release of Swift.<br class=""><br class="">– Configuration File Support<br class=""><br class="">We are considering adding a configuration file mechanism, which could be user-specific or package-specific, to allow customizing certain package manager behaviors. One immediate use for&nbsp;this would be as a temporary mechanism for passing overriding compiler flags for a package,&nbsp;though we hope to solve that need with a real build settings model. Other uses for a configuration&nbsp;file are up for consideration.<br class=""><br class="">– Multi-Package Repository Support<br class=""><br class="">Currently the package manager requires that each package live at the root&nbsp;of a Git repository. This means that you can't store multiple packages in the same repository, or&nbsp;develop packages which locate each other in a filesystem-relative manner without relying on Git. We&nbsp;need a proposal for how we would like to support this.<br class=""><br class="">There is a draft evolution proposal in progress at&nbsp;<a href="https://github.com/ddunbar/swift-evolution/blob/multi-package-repos/proposals/NNNN-swiftpm-multi-package-repos.md" class="">https://github.com/ddunbar/swift-evolution/blob/multi-package-repos/proposals/NNNN-swiftpm-multi-package-repos.md</a><br class=""><br class=""><b class="">Beyond Swift 4</b><br class=""><br class="">Swift 4 will be a big step forward for the package manager, but there are many features we don't have time for in this release.&nbsp;Upcoming features we'll be considering after Swift 4 include a centralized package index, support for package resources (such as image assets),&nbsp;license and metadata support, explicit support for handling source control forking,&nbsp;and a generic mechanism for invoking build tools that the package manager doesn't natively support.<br class=""><br class="">- - -<br class=""><br class="">We really appreciate the enthusiastic adoption and feedback we've gotten from the package manager community.&nbsp;We'll be bringing each of these topics to discuss with the community as we tackle them, so look for&nbsp;separate mailing list threads about each feature in the future.<br class=""><br class="">Thank you all for your support!<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>-&nbsp;Rick</div><div class=""><br class=""></div></div></body></html>