Skip to content

Commit 48ad9b9

Browse files
committed
Disable library evolution for SwiftPM build
1 parent 431b273 commit 48ad9b9

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

Package.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ let package = Package(
2424
.product(name: "PlainPocketFFT", package: "plain-pocketfft"),
2525
.product(name: "PocketFFT", package: "pocketfft")
2626
],
27-
path: "Sources",
28-
swiftSettings: [
29-
.unsafeFlags(["-enable-library-evolution"]),
30-
.define("BUILD_LIBRARY_FOR_DISTRIBUTION")
31-
]
27+
path: "Sources"
3228
),
3329
.testTarget(
3430
name: "OtosakuFeatureExtractorTests",

Sources/OtosakuFeatureExtractor/Array+Extensions.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ extension FloatingPoint {
110110

111111
}
112112

113-
public extension Array {
113+
extension Array {
114114

115115
static func multplyVector(matrix1: [[Double]], matrix2: [[Double]]) -> [[Double]] {
116116
let newMatrixCols = matrix1.count
@@ -182,7 +182,7 @@ public extension Array {
182182

183183
extension Array where Element == [Double] {
184184

185-
public var transposed: [[Double]] {
185+
var transposed: [[Double]] {
186186
let matrix = self
187187
let newMatrixCols = matrix.count
188188
let newMatrixRows = matrix.first?.count ?? 1
@@ -212,7 +212,7 @@ extension Array where Element == [Double] {
212212
return matrixResult
213213
}
214214

215-
public func dot(matrix: [Element]) -> [Element] {
215+
func dot(matrix: [Element]) -> [Element] {
216216
let matrixRows = matrix.count
217217
let matrixCols = matrix.first?.count ?? 1
218218

@@ -232,7 +232,7 @@ extension Array where Element == [Double] {
232232

233233
extension Array where Element == [(real: Double, imagine: Double)] {
234234

235-
public var transposed: [Element] {
235+
var transposed: [Element] {
236236
let matrix = self
237237
let newMatrixCols = matrix.count
238238
let newMatrixRows = matrix.first?.count ?? 1
@@ -481,7 +481,7 @@ extension Array where Element == [Double] {
481481
return result
482482
}
483483

484-
public func normalizeAudioPowerArray() -> [[Double]] {
484+
func normalizeAudioPowerArray() -> [[Double]] {
485485
let chunkSize = self.first?.count ?? 0
486486
let dbValues = self.flatMap { $0 }.normalizeAudioPower().chunked(into: chunkSize)
487487
return dbValues

Sources/OtosakuFeatureExtractor/OtosakuFeatureExtractor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class OtosakuFeatureExtractor {
102102

103103
}
104104

105-
public func expandDims2D(array: MLMultiArray) throws -> MLMultiArray {
105+
func expandDims2D(array: MLMultiArray) throws -> MLMultiArray {
106106
let originalShape = array.shape.map { $0.intValue }
107107
let newShape = [1, 1] + originalShape
108108

0 commit comments

Comments
 (0)