swift-algorithms
swift-algorithms copied to clipboard
Can't build version 1.2.1 (Draft)
I'm currently having trouble adding/building version 1.2.1 to my project. I tried using 1.2.0 and everything built fine.
Swift Algorithms version: 1.2.1
Swift version: swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1) / my Package.swift file is set to 5.9
Checklist
- [ ] If possible, I've reproduced the issue using the
mainbranch of this package - [x] I've searched for existing GitHub issues
Steps to Reproduce
Replace this paragraph with an explanation of how to reproduce the incorrect behavior. Include a simple code example, if possible.
Expected behavior
Compilation to work
Actual behavior
I get an error about importing _NumericShims.
(marked as a draft because I'm still doing a bit of troubleshooting, but I wanted to throw it out there in case I don't have time to get back to it)
+1
The same
Same for us
Ping @natecook1000
For me the UI tests target fails to build. However, if I add “Algorithms” directly to the UI Tests target, the error is resolved. v 1.2.0 works fine.
Could someone help me narrow this down to reproduce the issue? I'm not seeing this issue when including Algorithms in another package, with package versions 5.8 - 5.11 and 6.0 and both Swift 5 and Swift 6 language modes.
Hmm - It sounds like others might be using Xcode projects, but I'm using a swift package. I'm on Xcode Version 16.2 (16C5032a) and am running an M1 MacBook Air.
Are there any other environmental details that might help?
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "****INTERNAL****",
platforms: [
.macOS(.v12),
.iOS(.v15),
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "****INTERNAL****",
targets: ["****INTERNAL****"]),
.library(
name: "**INTERNAL2**",
targets: ["**INTERNAL2**"]),
.executable(
name: "RegexUpdater",
targets: ["RegexUpdater"]),
.executable(
name: "XMLSanitizer",
targets: ["XMLSanitizer"]),
],
dependencies: [
.package(url: "https://github.com/mredig/SwiftPizzaSnips.git", .upToNextMajor(from: "0.4.10")),
.package(url: "[email protected]:getrembrand/****INTERNAL3****.git", .upToNextMajor(from: "0.3.1")),
.package(url: "https://github.com/mredig/PizzaMacros.git", .upToNextMajor(from: "0.1.3")),
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMajor(from: "1.3.0")),
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.1.0")),
.package(url: "https://github.com/mredig/Swiftwood.git", .upToNextMajor(from: "0.4.6")),
// .package(url: "https://github.com/apple/swift-algorithms.git", "1.2.0"..<"1.2.1"), // this is how I pin to 1.2.0
.package(url: "https://github.com/apple/swift-algorithms.git", .upToNextMajor(from: "1.2.1")),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "****INTERNAL****",
dependencies: [
"SwiftPizzaSnips",
"****INTERNAL3****",
"PizzaMacros",
.product(name: "Collections", package: "swift-collections"),
"Swiftwood",
],
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals")
]),
.target(
name: "**INTERNAL2**",
dependencies: [
"****INTERNAL****",
"SwiftPizzaSnips",
"****INTERNAL3****",
.product(name: "Algorithms", package: "swift-algorithms"),
],
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals")
]),
.target(
name: "TestResources",
resources: [
.copy("Resources")
]),
.executableTarget(
name: "RegexUpdater",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"SwiftPizzaSnips",
],
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals")
]),
.executableTarget(
name: "XMLSanitizer",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"SwiftPizzaSnips",
],
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals")
]),
.testTarget(
name: "****INTERNAL****Tests",
dependencies: [
"****INTERNAL****",
"SwiftPizzaSnips",
"TestResources",
],
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals")
]),
.testTarget(
name: "**INTERNAL2**Tests",
dependencies: [
"SwiftPizzaSnips",
"**INTERNAL2**",
"TestResources",
],
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals")
]),
]
)
Here's my Package.swift file - I was overly liberal in censoring internal components just to be safe, but if you need any information about them I could probably elaborate.
Here's some of the Xcode report (again, overly censored cuz I'm paranoid):
It continues on like this repeated for many files.
Could someone help me narrow this down to reproduce the issue? I'm not seeing this issue when including
Algorithmsin another package, with package versions 5.8 - 5.11 and 6.0 and both Swift 5 and Swift 6 language modes.
Is there any other information you need I might be able to help with?
+1 I’m also facing the same issue and am stuck at version 1.2.0.