Closed thSoft closed 7 years ago
Sorry, I forgot to increase the version number of Swift. This is now a Swift 4 package. I've updated the Package.swift file. Does that work for you now?
Thanks, but unfortunately now I get:
MacBook-Pro-of-thSoft:Notation thsoft$ swift build
Updating https://github.com/objecthub/swift-numberkit.git
error: manifest parse error(s):
/var/folders/d7/qt541tgd3vzfk32m544ks8mw0000gn/T/TemporaryFile.QsjaGR.swift:29:3: error: argument 'exclude' must precede argument 'targets'
exclude: []
~~^~~~~~~~~~~
So I think your still using the SwiftPM version 3 syntax for a Swift 4 package.
I had to make these changes:
diff --git a/Package.swift b/Package.swift
index c997af7..a6a7089 100644
--- a/Package.swift
+++ b/Package.swift
@@ -23,8 +23,19 @@ import PackageDescription
let package = Package(
name: "NumberKit",
- targets: [Target(name: "NumberKit")],
+ products: [
+ .library(
+ name: "NumberKit",
+ targets: ["NumberKit"]),
+ ],
dependencies: [],
- swiftLanguageVersions: [4],
- exclude: []
+ targets: [
+ .target(
+ name: "NumberKit",
+ dependencies: []),
+ .testTarget(
+ name: "NumberKitTests",
+ dependencies: ["NumberKit"]),
+ ],
+ swiftLanguageVersions: [4]
)
Then swift test
would run for me.
Thanks for the advice. I've adapted the version 4 API and tested it. Should work now.
Thanks, I confirm that the update works.
I tried to use the package with the following Package.swift file:
When building my package, I get the following errors: