mxcl / Path.swift

Delightful, robust, cross-platform and chainable file-pathing functions.
The Unlicense
946 stars 36 forks source link

import Path // mxcl/Path.swift ~> 1.0.0 not working with Xcode 11.4 #59

Closed c0diq closed 4 years ago

c0diq commented 4 years ago

I have a script

#!/usr/bin/swift sh

import Commander // @kylef ~> 0.9.1
import Environment // @wlisac ~> 0.11.1
import Foundation
import Path // mxcl/Path.swift ~> 1.0.0
import ShellOut // @JohnSundell ~> 2.0.0

When I run it with Xcode 11.3.1 command-line tools, it compiles fine. When I runt it with Xcode 11.4 command-line tools, I get the following error:

Resolving https://github.com/mxcl/Path.swift.git at 1.0.1
'lint' /Users/srebaud/Library/Developer/swift-sh.cache/6d4dfe72d3b82da83c126a62c089349f: error: dependency 'Path' in target 'lint' requires explicit declaration; reference the package in the target dependency with '.product(name: "Path", package: "Path.swift")'
error: 1 <(/usr/bin/swift build -Xswiftc -suppress-warnings)

In both cases, the Package.swift is identical:

// swift-tools-version:5.2
import PackageDescription

let pkg = Package(name: "lint")

pkg.products = [
    .executable(name: "lint", targets: ["lint"])
]
pkg.dependencies = [
    .package(url: "https://github.com/kylef/Commander.git", .upToNextMajor(from: "0.9.1")),
    .package(url: "https://github.com/wlisac/Environment.git", .upToNextMajor(from: "0.11.1")),
    .package(url: "https://github.com/mxcl/Path.swift.git", .upToNextMajor(from: "1.0.0")),
    .package(url: "https://github.com/JohnSundell/ShellOut.git", .upToNextMajor(from: "2.0.0"))
]
pkg.targets = [
    .target(name: "lint", dependencies: ["Commander", "Environment", "Path", "ShellOut"], path: ".", sources: ["main.swift"])
]

#if swift(>=5) && os(macOS)
pkg.platforms = [
   .macOS(.v10_15)
]
#endif
mxcl commented 4 years ago

This is a bug with swift-sh, we have tickets open there.

c0diq commented 4 years ago

Ok. Can you link the ticket?

-s

On Apr 1, 2020, at 11:59 AM, Max Howell notifications@github.com wrote:

 This is a bug with swift-sh, we have tickets open there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Ashraf-Ali-aa commented 4 years ago

https://github.com/mxcl/homebrew-made/issues/9

christopherkarani commented 4 years ago

Was this ever resolved? I have the same error

christopherkarani commented 4 years ago

"This is a bug with swift-sh, we have tickets open there." @mxcl can you link said tickets?

mxcl commented 4 years ago

We believe it is fixed with the latest version 2.0.0