When trying to include a target dependency I get the error: The manifest describes a target that cannot be found in your source tree: parser
Here is my Package.swift file:
import PackageDescription
let package = Package(
name: "Phoenix",
targets: [
Target(
name: "Phoenix",
dependencies: [.Target(name: "parser")]),
Target(
name: "parser")
]
)
I am following the format described here: https://github.com/apple/swift-package-manager/blob/master/Documentation/Package.swift.md
Do you have a parser
directory?
You should have a layout something like:
.
└── Sources
└── Phoenix
│ └── File1.swift
└── parser
└── File2.swift
Or:
.
└── Phoenix
│ └── File1.swift
└── parser
└── File2.swift
This instructs SwiftPM to create two modules, one called Phoenix and one called "parser".
While you're both right, my actual problem was that my subdirectory didn't contain any swift code so a module wasn't being generated
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With