Swiftpack.co - Package - SDGGiesbrecht/SDGSwift

macOS • Linux



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: SDGSwift, SDGXcode
  • Package Manager operations such as fetching and manifest loading: SDGSwiftPackageManager
  • Utilities for defining configuration files written in Swift (similar to package manifests): SDGSwiftConfiguration, SDGSwiftConfigurationLoading

Versioning note: Most products are already “finalized” at a state comparable to a semantic version one (SDGSwift, SDGSwiftSource, SDGSwiftConfiguration and SDGSwiftConfigurationLoading). The package as a whole remains zero‐versioned because SDGSwiftPackageManager and SDGXcode still rely on hidden implementation details of the package manager and Xcode respectively.

Example Usage

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


SDGSwift provides libraries for use with the Swift Package Manager.

Simply add SDGSwift as a dependency in Package.swift and specify which of the libraries to use:

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

The modules can then be imported in source files:

import SDGSwift
import SDGSwiftPackageManager
import SDGSwiftSource
import SDGXcode
import SDGSwiftConfiguration
import SDGSwiftConfigurationLoading
import SampleConfiguration


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: 11
Help us keep the lights on



0.14.1 - Oct 9, 2019

Bug Fixes

  • Compatible with Xcode 11.1 (in addition to Xcode 11.0).

0.14.0 - Oct 5, 2019

Breaking Changes

  • ExtendedSyntax nodes have been adjusted according to Markdown parsing changes in the compiler.

New Features

  • All platform restrictions have been removed.

0.13.1 - Sep 24, 2019

Bug Fixes

  • Configuration loading has been adjusted to reduce the chances of encountering SR‐11513.
  • Fixed a bug where Git’s ignoredFiles() missed files on some devices.

0.13.0 - Sep 23, 2019

Breaking Changes

  • Swift 5.1
  • Xcode 11

New Features

  • SyntaxCollection methods isEmpty and first have been filled in to replace counterparts dropped by SwiftSyntax.

0.12.7 - Sep 5, 2019

Bug Fixes

  • Fixed an issue where whitespaces in package names could cause Xcode operations to fail.