Swiftpack.co - Package - SDGGiesbrecht/SDGSwift


macOS • Linux

APIs: SDGSwiftSDGSwiftPackageManagerSDGXcode


SDGSwift enables use of the Swift compiler as a package dependency.

השֹּׁלֵחַ אִמְרָתוֹ אָרֶץ עַד־מְהֵרָה יָרוּץ דְּבָרוֹ׃
He sends His command to the earth; His word runs swiftly.

                                                                                                    ―a psalmist


  • Compiler operations such as building and testing.
  • Package Manager operations such as fetching and manifest loading.

(For a list of related projects, see here.)


SDGSwift is intended for use with the Swift Package Manager.

Simply add SDGSwift as a dependency in Package.swift:

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/SDGGiesbrecht/SDGSwift", .upToNextMinor(from: Version(0, 1, 6))),
    targets: [
        .target(name: "MyTarget", dependencies: [
            .productItem(name: "SDGSwift", package: "SDGSwift"),
            .productItem(name: "SDGSwiftPackageManager", package: "SDGSwift"),
            .productItem(name: "SDGXcode", package: "SDGSwift"),

SDGSwift can then be imported in source files:

import SDGSwift
import SDGSwiftPackageManager
import SDGXcode

Example Usage

do {
    let package = Package(url: URL(string: "https://github.com/apple/example-package-dealer")!)
    try package.build(.version(Version(2, 0, 0)), to: temporaryDirectory)
} catch {


The SDGSwift project is maintained by Jeremy David Giesbrecht.

If SDGSwift saves you money, consider giving some of it as a donation.

If SDGSwift saves you time, consider devoting some of it to contributing back to the project.

Ἄξιος γὰρ ὁ ἐργάτης τοῦ μισθοῦ αὐτοῦ ἐστι.
For the worker is worthy of his wages.



Stars: 1
Help us keep the lights on



0.1.6 - May 16, 2018

Bug Fixes

  • Package.build(_:to:reportProgress:) better handles packages with dynamic linking.

0.1.5 - May 15, 2018

Bug Fixes

  • Compatible with Xcode 9.3.1 (in addition to Xcode 9.3.0).

0.1.4 - May 12, 2018

Bug Fixes

  • Fixed a bug where coverage reports could be mistaken for corrupt if a region was tested enough times to overflow Int.

0.1.3 - May 12, 2018

Bug Fixes

  • Fixed a bug where test coverage checks could crash if a file began immediately with a testable region. (i.e. not a comment, whitespace, import statement, etc.)

0.1.2 - May 10, 2018

Bug Fixes

  • Fixed a bug where test coverage checks could crash if a coverage range began with a character above U+007F.