Swiftpack.co - Package - SDGGiesbrecht/SDGSwift

macOS • Windows • Web • CentOS • Ubuntu • Android • Amazon 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

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(
      name: "SDGSwift",
      url: "https://github.com/SDGGiesbrecht/SDGSwift",
      from: Version(3, 0, 3)
    ),
  ],
  targets: [
    .target(
      name: "MyTarget",
      dependencies: [
        .product(name: "SDGSwift", package: "SDGSwift"),
        .product(name: "SDGSwiftPackageManager", package: "SDGSwift"),
        .product(name: "SDGSwiftSource", package: "SDGSwift"),
        .product(name: "SDGXcode", package: "SDGSwift"),
        .product(name: "SDGSwiftConfiguration", package: "SDGSwift"),
        .product(name: "SDGSwiftConfigurationLoading", package: "SDGSwift"),
        .product(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: 28

Dependencies

Used By

Total: 0

Releases

Version 3.0.3 -

Bug Fixes

  • SDGSwiftPackageManager is compatible with Swift 5.3.1.
  • Escaping changes in newer versions of Git no longer interfere with ignoredFiles().

Version 3.0.2 -

Bug Fixes

  • Tests run on the iPhone 12 simulator if it is available.

Version 3.0.1 -

Bug Fixes

  • Quoting changes in newer versions of Git no longer interfere with ignoredFiles().

Version 3.0.0 -

Breaking Changes

  • SDGSwiftPackageManager requires Swift 5.3.

Version 2.1.1 -

Bug Fixes

  • Dependencies are properly filtered out of test coverage results even when using Xcode’s build‐in package support.

Version 2.1.0 -

New Features

  • CentOS and Amazon Linux are now supported.

Bug Fixes

  • Dependencies are properly filtered out of test coverage results even when using Xcode’s build‐in package support.

Version 2.0.2 -

Bug Fixes

  • Windows stability has been improved.

Version 2.0.1 -

Bug Fixes

  • Build intermediates are filtered out better when installing products.

Version 2.0.0 -

Breaking Changes

  • Previously deprecated methods have now been removed completely.

Version 1.0.3 -

Bug Fixes

  • The breaking changes that occurred in version 1.0.2 have been fixed. Both method variants are available side‐by‐side, those from 1.0.1 and earlier and those from 1.0.2.
  • Package operations are compatible with Swift 5.2.4.

Version 1.0.2 -

⚠️ This patch inadvertently contained breaking changes. The signatures of the load methods in SDGSwiftConfigurationLoading changed.

Bug Fixes

  • Compatible with Swift 5.2.3.
  • Configuration loading uses manifest tools version 5.2 if it is available, improving resolution efficiency.
  • Configuration loading allows import statements to have their associated comments on the following line, so that long names can still satisfy Swift’s official formatter.

Version 1.0.1 -

Bug Fixes

  • Dependencies have been updated.

Version 1.0.0 -

Breaking Changes

  • Test coverage is now queried through SwiftPM’s command line interface. Related API has been sunk from SDGSwiftPackageManager into SDGSwift.
  • ExtendedTokenKind no longer has the .escape case. These are handled by SwiftSyntax anyway now.

New Features

  • Web is now supported. Actual runtime stability depends on the toolchain used to compile the package.

Bug Fixes

  • The core library APIs used for documentation inheritance have been updated for Swift 5.2.

Version 0.20.1 -

Bug Fixes

  • Configurations load successfully.

Version 0.20.0 -

Breaking Changes

  • Features derived from SwiftPM require Swift 5.2.
  • API involving SwiftSyntax has been updated according to upstream changes.

Version 0.19.3 -

Bug Fixes

  • Minor internal optimizations.

Version 0.19.2 -

New Features

  • Windows and Android are supported. Actual runtime stability depends on the toolchain used to compile the package. Many dependencies do not support these platforms; types and methods that rely on such dependencies are unavailable.

Version 0.19.1 -

Bug Fixes

  • Several access control issues have been resolved.

Version 0.19.0 -

Breaking Changes

  • SyntaxScanner is now a protocol.
  • FunctionalSyntaxScanner is now a structure.

Bug Fixes

  • Syntax highlighting exposes the entire syntax tree to CSS.
  • PackageRepository.scheme() is better at identifying the proper package scheme when other schemes are available.
  • Test coverage boundaries reported Xcode have fewer differences from those reported by SwiftPM.

0.18.4 -

Bug Fixes

  • Compatibility with Swift 5.1.3 and Xcode 11.3.

Version 0.18.3 -

Bug Fixes

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

Version 0.18.2 -

Bug Fixes

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

Version 0.18.1 -

New Features

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

Version 0.18.0 -

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.

Version 0.17.0 -

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.

Version 0.16.2 -

New Features

  • Compatibility with up to Swift 5.1.2 and Xcode 11.2.

Version 0.16.1 -

Bug Fixes

  • HTML entities remain intact when inspecting Markdown source nodes.
  • Several dropped core library symbols have been restored for inheritance.

Version 0.16.0 -

Breaking Changes

  • Xcode 11.1
  • Version has been dropped. (It is now in SDGCornerstone’s SDGVersioning instead.)
  • SDGXcode supports raw packages without Xcode projects.
    • Xcode’s preferred location for derived data cannot be reliably determined for a package. Instead, a particular derived data location can be specified for building and testing. Test coverage checks that follow must query the same directory. stableDerivedData can be used for this purpose.
    • Error types and cases have been adjusted.
  • ExtendedTokenKind has a new case: sourceHeading.

New Features

  • Testing is done with automatic test detection, even on Linux.

Bug Fixes

  • Syntax highlighting colours have been updated.

Version 0.15.0 -

Breaking Changes

  • Package loading methods have been refactored to defer more of the work to SwiftPM itself. The error types have changes and error messages are higher quality.
  • SyntaxParser.parse(_:) has been removed. Use SwiftSyntax’s own new equivalent: SwiftParser.parse(source:).

Bug Fixes

  • Fixed an issue where invalid UTF‐8 offsets received from CommonMark could lead to crashes. While rounding to valid offsets reduces the risk of a crash, the result may still be logically incorrect.
  • Several of Swift’s newer keywords are now directly supported.
  • Core library inheritance information has been updated to match Swift 5.1.

Version 0.14.1 -

Bug Fixes

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