-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to test an executable target on Windows #6083
Comments
same issue. |
I use this way to setting Package.swift // 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: "test-swift",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(name: "library-test-swift", targets: ["library-test-swift"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "2.2.4")
],
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: "library-test-swift", dependencies: [.product(name: "Crypto", package: "swift-crypto")]),
.executableTarget(name: "test-swift", dependencies: ["library-test-swift"]),
.testTarget(name: "test-swiftTests", dependencies: [
"library-test-swift",
// "test-swift"
]),
]
) |
is there any working example repository? @agrozyme |
I don't have Mac device, and I only use Windows 10 for work. I have some screen shot but I don't know how to put them in this replay. |
Same here...
Just drag & drop the files to the writing area, it will automatically upload & attached to the comment. |
Steps To Reproduce
In an empty directory named hello:
This outputs:
This is with Swift 5.7 on Windows 11.
This does work on macOS.
The text was updated successfully, but these errors were encountered: