tbaranes / SwiftyUtils

All the reusable code that we need in each project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift Package Manager 4 support

rootscript opened this issue · comments

I'm trying to use SwiftyUtils with Swift Package Manager 4, but have errors.

Package.swift is:

// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "test-SwiftyUtils-SPM4",
    dependencies: [
        .package(url: "https://github.com/tbaranes/SwiftyUtils.git", from: "2.0.0")
    ],
    targets: [
        .target(
            name: "test-SwiftyUtils-SPM4",
            dependencies: ["SwiftyUtils"]),
    ]
)

When I run swift package generate-xcodeproj, i get:

error: package has unsupported layout; found loose source files: /Users/john/Desktop/test-SwiftyUtils-SPM4/.build/checkouts/SwiftyUtils.git--6738090307716277572/Sources/Constants.swift

I'm using:
Apple Swift Package Manager - Swift 4.0.0-dev (swiftpm-13752)
Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2
macOS Sierra 10.12.6

This might be of use: nicklockwood/SwiftFormat#183

I have to say that I didn’t try spm for swiftyutils since the first release, any PR welcomed!

Fixed in #122