Skip to content
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

Can't build version 1.2.1 (Draft) #249

Open
1 of 2 tasks
mredig opened this issue Feb 18, 2025 · 9 comments
Open
1 of 2 tasks

Can't build version 1.2.1 (Draft) #249

mredig opened this issue Feb 18, 2025 · 9 comments

Comments

@mredig
Copy link

mredig commented Feb 18, 2025

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 main branch of this package
  • 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)

@davemess
Copy link

+1

@larryonoff
Copy link

The same

@hassila
Copy link

hassila commented Feb 21, 2025

Same for us

@hassila
Copy link

hassila commented Feb 21, 2025

Ping @natecook1000

@vvbutko
Copy link

vvbutko commented Feb 21, 2025

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.

@natecook1000
Copy link
Member

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.

@mredig
Copy link
Author

mredig commented Feb 25, 2025

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?

@mredig
Copy link
Author

mredig commented Feb 25, 2025

// 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.

@mredig
Copy link
Author

mredig commented Feb 25, 2025

Here's some of the Xcode report (again, overly censored cuz I'm paranoid):

Image

It continues on like this repeated for many files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants