I've written my first package using Xcode and put it on GitHub. I've read through the tutorials, made no changes to the Package file, tagged the repo and made sure the tag is matching in the GitHub repo.
When I import the package into another package or into a Swift app in Xcode, I can add
import SwErl at the top of any file and the app still compiles. If I then try to use one of the functions, for example the
func spawn(queueToUse:DispatchQueue = DispatchQueue.global(),function:@escaping @Sendable(UUID,Any)->Void)throws -> UUID function, the compiler complains with "Cannot find 'spawn' in scope"
It must be something simple I'm missing.
Any ideas would be greatly appreciated.
If it helps, you can find the entire package on GitHub
Here is the Package file.
// swift-tools-version: 5.7 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "SwErl", products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "SwErl", targets: ["SwErl"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), ], 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 this package depends on. .target( name: "SwErl", dependencies: ), .testTarget( name: "SwErlTests", dependencies: ["SwErl"]), ] )