Skip to content

Commit 027bcc5

Browse files
committed
Remove conformance of Complex to Differentiable
The conformance was breaking CI testing, because the CI bots use a macOS version that predates availability of the _Differentiation module, and the compiler-generated differentation operations have neither availability attributes nor checks, so any reference to those operations simply crashes in dyld because the library is not present. We can add availability, but that's not really accurate either, because these operations are not actually binary-stable, so while we wouldn't crash in dyld, we also might not work correctly in the future. We could mark them unavailable on Apple platforms, but that's also not quite right (and further means that they're not going to get a lot of attention). The best solution seems to be to remove the conformance (which was never source-stable).
1 parent fc1b2d1 commit 027bcc5

File tree

6 files changed

+1
-195
lines changed

6 files changed

+1
-195
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To use Swift Numerics in a SwiftPM project:
5959
## Source stability
6060

6161
The Swift Numerics package is source stable; version numbers follow [Semantic Versioning](https://semver.org).
62-
The public API of the `swift-numerics` package consists of non-underscored declarations that are marked either `public` or `usableFromInline` in modules re-exported by the top-level `Numerics` module, *excepting any API that involves a conformance to Differentiable (because Differentiable itself is not stable in Swift)*.
62+
The public API of the `swift-numerics` package consists of non-underscored declarations that are marked either `public` or `usableFromInline` in modules re-exported by the top-level `Numerics` module.
6363
Interfaces that aren't part of the public API may continue to change in any release, including patch releases.
6464

6565
Note that contents of the `_NumericsShims` and `_TestSupport` modules, as well as contents of the `Tests` directory, explicitly are not public API.

Sources/ComplexModule/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ add_library(ComplexModule
1212
Complex+AdditiveArithmetic.swift
1313
Complex+AlgebraicField.swift
1414
Complex+Codable.swift
15-
Complex+Differentiable.swift
1615
Complex+ElementaryFunctions.swift
1716
Complex+Hashable.swift
1817
Complex+IntegerLiteral.swift

Sources/ComplexModule/Complex+Differentiable.swift

Lines changed: 0 additions & 101 deletions
This file was deleted.

Tests/ComplexTests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ See https://swift.org/LICENSE.txt for license information
1010
add_library(ComplexTests
1111
ApproximateEqualityTests.swift
1212
ArithmeticTests.swift
13-
DifferentiableTests.swift
1413
ElementaryFunctionTests.swift
1514
PropertyTests.swift)
1615
set_target_properties(ComplexTests PROPERTIES

Tests/ComplexTests/DifferentiableTests.swift

Lines changed: 0 additions & 76 deletions
This file was deleted.

Tests/WindowsMain.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,6 @@ var testCases = [
161161
IntegerUtilitiesTests.DoubleWidthTests.all,
162162
]
163163

164-
#if canImport(_Differentiation)
165-
extension DifferentiableTests {
166-
static var all = testCase([
167-
("testComponentGetter", DifferentiableTests.testComponentGetter),
168-
("testInitializer", DifferentiableTests.testInitializer),
169-
("testConjugate", DifferentiableTests.testConjugate),
170-
("testArithmetics", DifferentiableTests.testArithmetics),
171-
])
172-
}
173-
174-
testCases += [
175-
DifferentiableTests.all
176-
]
177-
#endif
178-
179164
XCTMain(testCases)
180165

181166
#endif

0 commit comments

Comments
 (0)