Swiftpack.co - Package - SDGGiesbrecht/SDGSwift

macOS • Linux

Documentation

SDGSwift

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

השֹּׁלֵחַ אִמְרָתוֹ אָרֶץ עַד־מְהֵרָה יָרוּץ דְּבָרוֹ׃

He sends His command to the earth; His word runs swiftly.

―a psalmist

Features

  • 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, SDGXcode, SDGSwiftConfiguration and SDGSwiftConfigurationLoading). The package as a whole remains zero‐versioned because SDGSwiftPackageManager still relies on hidden implementation details of the package manager.

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()

Importing

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, 18, 3))),
    ],
    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

About

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.

―‎ישוע/Yeshuʼa

Github

link
Stars: 17
Help us keep the lights on

Dependencies

Releases

0.18.3 - Dec 10, 2019

Bug Fixes

  • HTML entities in documentation are no longer escaped when rendered.

0.18.2 - Dec 8, 2019

Bug Fixes

  • Xcode’s warning check has been improved to ignore more warnings caused by SwiftPM’s project generation.

0.18.1 - Dec 6, 2019

New Features

  • PackageRepository instances can now checkout(_:) branches.

0.18.0 - Dec 3, 2019

Breaking Changes

  • Many calls to Swift, Git and Xcode permit a wider version range according to the availability of the necessary APIs.
    • The custom subcommand methods and error types have been redesigned accordingly.
  • Functionality deprecated by Swift has been removed, such as test manifest generation and static linking of the Standard Library.
  • Derived data is no longer necessary for locating test coverage and related API has been removed.

0.17.0 - Nov 15, 2019

Breaking Changes

  • Swift 5.1.1–5.1.2
  • Xcode 11.2–11.2.1

Bug Fixes

  • The search algorithm for manifest entry documentation tolerates of more formatting variations.
  • API scanning understands property wrappers.