I am using Swift package manager to manage dependencies in my project. I am trying to import LineNoise in my swift package, but I get this:
nathanfallet:SwiftMC nathanfallet$ swift run
Fetching https://github.com/andybest/linenoise-swift.git
Fetching https://github.com/Quick/Nimble.git
Fetching https://github.com/apple/swift-argument-parser
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/adam-fowler/compress-nio.git
Cloning https://github.com/apple/swift-nio.git
Resolving https://github.com/apple/swift-nio.git at 2.17.0
Cloning https://github.com/adam-fowler/compress-nio.git
Resolving https://github.com/adam-fowler/compress-nio.git at 0.3.0
Cloning https://github.com/apple/swift-argument-parser
Resolving https://github.com/apple/swift-argument-parser at 0.0.6
Cloning https://github.com/andybest/linenoise-swift.git
Resolving https://github.com/andybest/linenoise-swift.git at 0.0.3
Cloning https://github.com/Quick/Nimble.git
Resolving https://github.com/Quick/Nimble.git at 7.3.4
'SwiftMC' /Users/nathanfallet/git/SwiftMC: error: product dependency 'LineNoise' in package 'linenoise-swift' not found
It is not the first package I import, and others are working (and I'm importing them the same way). I added the package to my Package.swift file like my other packages, but this one seems to be not working...
My Package.swift file:
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "SwiftMC",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "SwiftMC",
targets: ["SwiftMC"]),
.executable(
name: "SwiftMCRun",
targets: ["SwiftMCRun"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
.package(url: "https://github.com/adam-fowler/compress-nio.git", from: "0.0.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"),
.package(url: "https://github.com/andybest/linenoise-swift.git", from: "0.0.1")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftMC",
dependencies: [
.product(name: "NIO", package: "swift-nio"),
.product(name: "CompressNIO", package: "compress-nio")
]),
.target(
name: "SwiftMCRun",
dependencies: [
"SwiftMC",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "LineNoise", package: "linenoise-swift") // Error seems to come from here; I tried "linenoise", "LineNoise", "linenoise-swift" but nothing seems to work
]),
.testTarget(
name: "SwiftMCTests",
dependencies: ["SwiftMC"]),
]
)
Any idea of what is wrong with it? Why is this package not importing while others are?